Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
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
- Dependency
-
IGNITE-22466 Sql. Support mapping to non-primary replicas
- Resolved
- links to