Skip to content

Commit 387ebef

Browse files
author
kvk1920
committed
Sequoia test suite
1 parent 4fc6a19 commit 387ebef

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

yt/yt/client/object_client/helpers.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ bool IsVersionedType(EObjectType type)
110110
type == EObjectType::RootstockMap ||
111111
type == EObjectType::Scion ||
112112
type == EObjectType::ScionMap ||
113-
type == EObjectType::ClusterProxyNode;
113+
type == EObjectType::ClusterProxyNode ||
114+
type == EObjectType::SequoiaMapNode;
114115
}
115116

116117
bool IsUserType(EObjectType type)

yt/yt/client/object_client/public.h

+3
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ DEFINE_ENUM(EObjectType,
214214
((AccessControlObjectNamespace) (432))
215215
((AccessControlObjectNamespaceMap) (433))
216216

217+
// Sequoia nodes
218+
((SequoiaMapNode) (1504))
219+
217220
// Cypress shards
218221
((CypressShard) (11004))
219222
((CypressShardMap) (11005))

yt/yt/client/transaction_client/helpers.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ bool IsMasterTransactionId(TTransactionId id)
2424
type == EObjectType::SystemNestedTransaction;
2525
}
2626

27+
bool IsTabletTransactionType(NObjectClient::EObjectType type)
28+
{
29+
return type == EObjectType::AtomicTabletTransaction || type == EObjectType::NonAtomicTabletTransaction;
30+
}
31+
2732
void ValidateTabletTransactionId(TTransactionId id)
2833
{
29-
auto type = TypeFromId(id);
30-
if (type != EObjectType::Transaction &&
31-
type != EObjectType::AtomicTabletTransaction &&
32-
type != EObjectType::NonAtomicTabletTransaction)
33-
{
34+
if (!IsTabletTransactionType(TypeFromId(id))) {
3435
THROW_ERROR_EXCEPTION("%v is not a valid tablet transaction id",
3536
id);
3637
}

yt/yt/client/transaction_client/helpers.h

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ struct TReadTimestampRange
2626
//! #EObjectType::SytemTransaction or #EObjectType::SystemNestedTransaction.
2727
bool IsMasterTransactionId(TTransactionId id);
2828

29+
bool IsTabletTransactionType(NObjectClient::EObjectType type);
30+
2931
//! Checks if #id represents a valid transaction accepted by tablets:
3032
//! the type of #id must be either
3133
//! #EObjectType::Transaction, #EObjectType::AtomicTabletTransaction,

0 commit comments

Comments
 (0)