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

PlacementDriver should have a method to return an assignments for a specified partition

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0
    • None

    Description

      Motivation

      In order to implement read from backup logic it's required to provide an ability to retrieve assignments at best-effort manner.

      Definition of Done

      Following method should be added to the PlacementDriver

      /**
       * Returns the future with either newest available tokenized assignments for the specified replication group id or {@code null} if
       * there are no such assignments. The future will be completed after clusterTime (meta storage safe time) will become greater or equal
       * to the clusterTimeToAwait parameter.
       *
       * @param replicationGroupId Replication group Id.
       * @param clusterTimeToAwait Cluster time to await.
       * @return Tokenized assignments.
       */
      CompletableFuture<TokenizedAssignments> getAssignments(ReplicationGroupId replicationGroupId, HybridTimestamp clusterTimeToAwait); 

      TokenizedAssignments is a common set of nodes along with associated token that allows to easely understand whether assignments were changed or not.

      /**
       * Set of nodes along with associated token that is guaranteed to be changed if the set was changed.
       */
      public interface TokenizedAssignments extends Serializable {
          /** Returns a set of nodes, represented by this assignments instance. */
          Set<Assignment> nodes();
      
          /** Returns a token associated with given assignments that is guaranteed to be changed if assignments were changed. */
          long token();
      } 

      Attachments

        Issue Links

          Activity

            People

              alapin Alexander Lapin
              alapin Alexander Lapin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m