File tree Expand file tree Collapse file tree 7 files changed +41
-1
lines changed Expand file tree Collapse file tree 7 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,15 @@ TReplicationCardId MakeReplicationCardId(TObjectId randomId)
21
21
EntropyFromId (randomId) & 0xffff0000 );
22
22
}
23
23
24
+ TReplicationCardId MakeChaosLeaseId (TObjectId randomId)
25
+ {
26
+ return MakeId (
27
+ EObjectType::ChaosLease,
28
+ CellTagFromId (randomId),
29
+ CounterFromId (randomId),
30
+ EntropyFromId (randomId) & 0xffff0000 );
31
+ }
32
+
24
33
TReplicaId MakeReplicaId (TReplicationCardId replicationCardId, TReplicaIdIndex index)
25
34
{
26
35
return MakeId (
Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ namespace NYT::NChaosClient {
11
11
// //////////////////////////////////////////////////////////////////////////////
12
12
13
13
using TReplicationCardId = NObjectClient::TObjectId;
14
- using TReplicationCardCollocationId = NObjectClient::TObjectId;
14
+ using TChaosObjectId = NObjectClient::TObjectId;
15
+ // using TReplicationCardId = TChaosObjectId;
16
+ using TReplicationCardCollocationId = TChaosObjectId;
17
+ using TChaosLeaseId = TChaosObjectId;
15
18
using TReplicaId = NObjectClient::TObjectId;
16
19
using TReplicationEra = ui64;
17
20
using TReplicaIdIndex = ui16;
Original file line number Diff line number Diff line change @@ -256,6 +256,16 @@ bool IsChaosTableReplicaType(EObjectType type)
256
256
return type == EObjectType::ChaosTableReplica;
257
257
}
258
258
259
+ bool IsReplicationCardType (EObjectType type)
260
+ {
261
+ return type == EObjectType::ReplicationCard;
262
+ }
263
+
264
+ bool IsChaosLeaseType (EObjectType type)
265
+ {
266
+ return type == EObjectType::ChaosLease;
267
+ }
268
+
259
269
bool IsCollocationType (EObjectType type)
260
270
{
261
271
return
Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ bool IsTableReplicaType(EObjectType type);
67
67
// ! Checks if the given type is a chaos replica.
68
68
bool IsChaosTableReplicaType (EObjectType type);
69
69
70
+ // ! Checks if the given type is a replication card.
71
+ bool IsReplicationCardType (EObjectType type);
72
+
73
+ // ! Checks if the given type is a chaos lease.
74
+ bool IsChaosLeaseType (EObjectType type);
75
+
70
76
// ! Checks if the given type is a collocation.
71
77
bool IsCollocationType (EObjectType type);
72
78
Original file line number Diff line number Diff line change @@ -342,6 +342,7 @@ DEFINE_ENUM(EObjectType,
342
342
((ChaosReplicatedTable) (1206 ))
343
343
((ReplicationCardCollocation) (1207 ))
344
344
((VirtualChaosCellMap) (1208 ))
345
+ ((ChaosLease) (1209 ))
345
346
346
347
// Other cluster components stuff
347
348
((ClusterProxyNode) (1500 ))
Original file line number Diff line number Diff line change
1
+ package NYT.NChaosClient.NProto ;
2
+
3
+ import "yt_proto/yt/core/misc/proto/guid.proto" ;
4
+
5
+ ////////////////////////////////////////////////////////////////////////////////
6
+
7
+ message TChaosLease
8
+ { }
9
+
10
+ ////////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change 19
19
cell_master/proto/cell_directory.proto
20
20
21
21
chaos_client/proto/replication_card.proto
22
+ chaos_client/proto/chaos_lease.proto
22
23
23
24
chunk_client/proto/data_statistics.proto
24
25
chunk_client/proto/chunk_meta.proto
You can’t perform that action at this time.
0 commit comments