diff options
author | kvk1920 <kvk1920@yandex-team.com> | 2023-09-30 11:10:14 +0300 |
---|---|---|
committer | kvk1920 <kvk1920@yandex-team.com> | 2023-09-30 11:26:23 +0300 |
commit | 387ebef344bd4106313ba94d62266865c2a33aee (patch) | |
tree | ced053f3a45356adccb7e7e7016d084a1c44365e | |
parent | 4fc6a19dd6b98b1cba250bcd94406177fddd236e (diff) | |
download | ydb-387ebef344bd4106313ba94d62266865c2a33aee.tar.gz |
Sequoia test suite
-rw-r--r-- | yt/yt/client/object_client/helpers.cpp | 3 | ||||
-rw-r--r-- | yt/yt/client/object_client/public.h | 3 | ||||
-rw-r--r-- | yt/yt/client/transaction_client/helpers.cpp | 11 | ||||
-rw-r--r-- | yt/yt/client/transaction_client/helpers.h | 2 |
4 files changed, 13 insertions, 6 deletions
diff --git a/yt/yt/client/object_client/helpers.cpp b/yt/yt/client/object_client/helpers.cpp index 0104eff9a20..a482061f032 100644 --- a/yt/yt/client/object_client/helpers.cpp +++ b/yt/yt/client/object_client/helpers.cpp @@ -110,7 +110,8 @@ bool IsVersionedType(EObjectType type) type == EObjectType::RootstockMap || type == EObjectType::Scion || type == EObjectType::ScionMap || - type == EObjectType::ClusterProxyNode; + type == EObjectType::ClusterProxyNode || + type == EObjectType::SequoiaMapNode; } bool IsUserType(EObjectType type) diff --git a/yt/yt/client/object_client/public.h b/yt/yt/client/object_client/public.h index 7863a6e6e03..f051ffeaa4b 100644 --- a/yt/yt/client/object_client/public.h +++ b/yt/yt/client/object_client/public.h @@ -214,6 +214,9 @@ DEFINE_ENUM(EObjectType, ((AccessControlObjectNamespace) (432)) ((AccessControlObjectNamespaceMap) (433)) + // Sequoia nodes + ((SequoiaMapNode) (1504)) + // Cypress shards ((CypressShard) (11004)) ((CypressShardMap) (11005)) diff --git a/yt/yt/client/transaction_client/helpers.cpp b/yt/yt/client/transaction_client/helpers.cpp index f4f32f95114..1837089cb7b 100644 --- a/yt/yt/client/transaction_client/helpers.cpp +++ b/yt/yt/client/transaction_client/helpers.cpp @@ -24,13 +24,14 @@ bool IsMasterTransactionId(TTransactionId id) type == EObjectType::SystemNestedTransaction; } +bool IsTabletTransactionType(NObjectClient::EObjectType type) +{ + return type == EObjectType::AtomicTabletTransaction || type == EObjectType::NonAtomicTabletTransaction; +} + void ValidateTabletTransactionId(TTransactionId id) { - auto type = TypeFromId(id); - if (type != EObjectType::Transaction && - type != EObjectType::AtomicTabletTransaction && - type != EObjectType::NonAtomicTabletTransaction) - { + if (!IsTabletTransactionType(TypeFromId(id))) { THROW_ERROR_EXCEPTION("%v is not a valid tablet transaction id", id); } diff --git a/yt/yt/client/transaction_client/helpers.h b/yt/yt/client/transaction_client/helpers.h index 419e2b36ead..3d0251ff467 100644 --- a/yt/yt/client/transaction_client/helpers.h +++ b/yt/yt/client/transaction_client/helpers.h @@ -26,6 +26,8 @@ struct TReadTimestampRange //! #EObjectType::SytemTransaction or #EObjectType::SystemNestedTransaction. bool IsMasterTransactionId(TTransactionId id); +bool IsTabletTransactionType(NObjectClient::EObjectType type); + //! Checks if #id represents a valid transaction accepted by tablets: //! the type of #id must be either //! #EObjectType::Transaction, #EObjectType::AtomicTabletTransaction, |