diff options
author | aleksandra-zh <aleksandra-zh@yandex-team.com> | 2025-02-02 23:21:42 +0300 |
---|---|---|
committer | aleksandra-zh <aleksandra-zh@yandex-team.com> | 2025-02-02 23:36:06 +0300 |
commit | 7c023d7e19b27c5ec24e41118f4f20c643e7dd31 (patch) | |
tree | 2bde5e04107dd5f81362f59e6784182d0c8236ad | |
parent | 4078b4f040b2db49b3b690eea4d0352e73caffe8 (diff) | |
download | ydb-7c023d7e19b27c5ec24e41118f4f20c643e7dd31.tar.gz |
Master sequencer
1. All transactions that are marked as StronglyOrdered will be ordered by commit timestamp. When transaction is committed it is marked as ReadyToCommit instead. ReadyToCommit can be committed when its commit timestamp is less then minimum prepared timestamp for all currently prepared strongly ordered transactions
2. All strongly ordered transaction now have a sequence number, that helps to implement WaitUntilPreparedTransactionsFinished
commit_hash:aebb6540240603ca4ea28825ae09317d608b9865
-rw-r--r-- | yt/yt/client/api/transaction.h | 3 | ||||
-rw-r--r-- | yt/yt/client/hive/transaction_participant.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/yt/yt/client/api/transaction.h b/yt/yt/client/api/transaction.h index 1f6eb795d1..dac7f87be8 100644 --- a/yt/yt/client/api/transaction.h +++ b/yt/yt/client/api/transaction.h @@ -65,6 +65,9 @@ struct TTransactionCommitOptions //! If |false| then coordinator will be chosen on the primary cell of the cluster //! that has been specified when starting transaction. bool AllowAlienCoordinator = false; + + //! All strongly ordered transactions are ordered by commit timestamp. + bool StronglyOrdered = false; }; struct TTransactionPingOptions diff --git a/yt/yt/client/hive/transaction_participant.h b/yt/yt/client/hive/transaction_participant.h index e52d381f26..04746deb3b 100644 --- a/yt/yt/client/hive/transaction_participant.h +++ b/yt/yt/client/hive/transaction_participant.h @@ -39,15 +39,18 @@ struct ITransactionParticipant TTransactionId transactionId, TTimestamp prepareTimestamp, NApi::TClusterTag prepareTimestampClusterTag, + bool stronglyOrdered, const std::vector<TCellId>& cellIdsToSyncWith, const NRpc::TAuthenticationIdentity& identity) = 0; virtual TFuture<void> CommitTransaction( TTransactionId transactionId, TTimestamp commitTimestamp, NApi::TClusterTag commitTimestampClusterTag, + bool stronglyOrdered, const NRpc::TAuthenticationIdentity& identity) = 0; virtual TFuture<void> AbortTransaction( TTransactionId transactionId, + bool stronglyOrdered, const NRpc::TAuthenticationIdentity& identity) = 0; virtual TFuture<void> CheckAvailability() = 0; |