Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-5597

Wrong javadoc in Affinity and AffinityFunction for REPLICATED cache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7
    • 2.3
    • None

    Description

      RendezvousAffinityFunction.getPartitions() Javadoc says:

           * Note that for fully replicated caches this method should always
           * return {@code 1}.
      

      but it's not true, it works the same as PARTITIONED cache.

      Affinity.mapKeyToNode(K key) javadoc says:

           * <li>
           *      For fully replicated caches first node ID returned by {@link AffinityFunction}
           *      is returned.
           * </li>
           * <li>For partitioned caches, primary node for the given key is returned.</li>
      
      

      it looks confusing, while REPLICATED cache has primary nodes for keys as PRATITIONED.

      Also,

      * Provides affinity information to detect which node is primary and which nodes are
       * backups for a partitioned cache.
      

      Affinity matter for REPLICATED cache too.

      Attachments

        Activity

          People

            Litanontaru Andrei Yakushin
            ezhuravl Evgenii Zhuravlev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: