You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladislav Pyatkov (Jira)" <ji...@apache.org> on 2024/06/21 12:48:00 UTC
[jira] [Comment Edited] (IGNITE-22467) PlacementDriver should have a method to return an assignments for a specified partition
[ https://issues.apache.org/jira/browse/IGNITE-22467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17856738#comment-17856738 ]
Vladislav Pyatkov edited comment on IGNITE-22467 at 6/21/24 12:47 PM:
----------------------------------------------------------------------
I reviewed the patch, and it agrees with my thoughts. But just be aware that a primary replica might not be part of assignments. It can happen after a rebalance where we intentionally hold a primary until the lease is expired.
was (Author: v.pyatkov):
I reviewd the patch and it agrees with my thoughts. But just be aware, a primary replica might be not a part of assignments. It can happen after rebalance where we intentanaly hold a primary until lease is expired.
> PlacementDriver should have a method to return an assignments for a specified partition
> ---------------------------------------------------------------------------------------
>
> Key: IGNITE-22467
> URL: https://issues.apache.org/jira/browse/IGNITE-22467
> Project: Ignite
> Issue Type: Improvement
> Reporter: Alexander Lapin
> Assignee: Alexander Lapin
> Priority: Major
> Labels: ignite-3
> Time Spent: 10m
> Remaining Estimate: 0h
>
> h3. Motivation
> In order to implement read from backup logic it's required to provide an ability to retrieve assignments at best-effort manner.
> h3. Definition of Done
> Following method should be added to the PlacementDriver
> {code:java}
> /**
> * 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); {code}
> TokenizedAssignments is a common set of nodes along with associated token that allows to easely understand whether assignments were changed or not.
> {code:java}
> /**
> * 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();
> } {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)