Skip to content

Commit 18c5200

Browse files
Merge branch 'key2' of github.com:FloatingCrowbar/ydb into key2
2 parents 728ad96 + d9dd38c commit 18c5200

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

ydb/core/persqueue/key.h

+18-3
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,30 @@ class TKeyPrefix : public TBuffer
6464

6565

6666
void SetType(EType type) {
67-
*PtrType() = type;
67+
if (!IsServicePartition()) {
68+
*PtrType() = type;
69+
return;
70+
}
71+
switch (type) {
72+
case TypeNone:
73+
*PtrType() = TypeNone;
74+
case TypeData:
75+
*PtrType() = ServiceTypeData;
76+
case TypeTmpData:
77+
*PtrType() = ServiceTypeTmpData;
78+
case TypeInfo:
79+
*PtrType() = ServiceTypeInfo;
80+
case TypeMeta:
81+
*PtrType() = ServiceTypeMeta;
82+
case TypeTxMeta:
83+
*PtrType() = ServiceTypeTxMeta;
84+
}
6885
}
6986

7087

7188
EType GetType() const {
7289
switch (*PtrType()) {
7390
case TypeNone:
74-
case ServiceTypeNone:
7591
return TypeNone;
7692
case TypeData:
7793
case ServiceTypeData:
@@ -109,7 +125,6 @@ class TKeyPrefix : public TBuffer
109125

110126
private:
111127
enum EServiceType : char {
112-
ServiceTypeNone = 1,
113128
ServiceTypeInfo = 'M',
114129
ServiceTypeData = 'D',
115130
ServiceTypeTmpData = 'X',

0 commit comments

Comments
 (0)