aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcherepashka <cherepashka@yandex-team.com>2025-03-06 12:00:20 +0300
committercherepashka <cherepashka@yandex-team.com>2025-03-06 14:10:34 +0300
commitce42f378a8120fbfcc2ccf08ff7616e8c02068d2 (patch)
treeba2d62a091949acddc6bb263915b9f7f8f8f399c
parent8008ea42ba45266ca3ba3773c4ed654e4c548d7d (diff)
downloadydb-ce42f378a8120fbfcc2ccf08ff7616e8c02068d2.tar.gz
YT-18506: Prerequisite transactions for Sequoia
- Changelog entry Type: feature Component: master Introduce prerequisite transactions for read & write requests in Sequoia commit_hash:3456f4997f34afbd741ade823382faf05fb3ec30
-rw-r--r--yt/yt/client/object_client/helpers-inl.h5
-rw-r--r--yt/yt/client/object_client/helpers.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/yt/yt/client/object_client/helpers-inl.h b/yt/yt/client/object_client/helpers-inl.h
index 000d5b1710..254d5b05b9 100644
--- a/yt/yt/client/object_client/helpers-inl.h
+++ b/yt/yt/client/object_client/helpers-inl.h
@@ -98,6 +98,11 @@ inline bool IsSequoiaId(TObjectId id)
return (CounterFromId(id) & SequoiaCounterMask) && !IsWellKnownId(id);
}
+inline bool IsCypressTransactionMirroredToSequoia(TTransactionId transactionId)
+{
+ return IsCypressTransactionType(TypeFromId(transactionId)) && IsSequoiaId(transactionId);
+}
+
inline TObjectId MakeRegularId(
EObjectType type,
TCellTag cellTag,
diff --git a/yt/yt/client/object_client/helpers.h b/yt/yt/client/object_client/helpers.h
index 6a4f49c30c..ac2f24714c 100644
--- a/yt/yt/client/object_client/helpers.h
+++ b/yt/yt/client/object_client/helpers.h
@@ -151,6 +151,9 @@ bool IsWellKnownId(TObjectId id);
*/
bool IsSequoiaId(TObjectId id);
+//! Returns |true| if a given #id corresponds to cypress transaction that is mirrored to Sequoia.
+bool IsCypressTransactionMirroredToSequoia(TTransactionId transactionId);
+
//! Constructs the id for a regular object.
TObjectId MakeRegularId(
EObjectType type,