@@ -14,6 +14,8 @@ namespace NKikimr::NBlobDepot {
14
14
std::unique_ptr<IEventHandle> Response;
15
15
std::vector<TBlobSeqId> BlobSeqIds;
16
16
std::set<TBlobSeqId> FailedBlobSeqIds;
17
+ std::set<TBlobSeqId> CanBeCollectedBlobSeqIds;
18
+ std::set<TBlobSeqId> AllowedBlobSeqIds;
17
19
18
20
public:
19
21
TTxType GetTxType () const override { return NKikimrBlobDepot::TXTYPE_COMMIT_BLOB_SEQ; }
@@ -35,8 +37,11 @@ namespace NKikimr::NBlobDepot {
35
37
Y_VERIFY_S (blobSeqId.Generation < generation, " committing trimmed BlobSeqId"
36
38
<< " BlobSeqId# " << blobSeqId.ToString ()
37
39
<< " Id# " << Self->GetLogId ());
40
+ CanBeCollectedBlobSeqIds.insert (blobSeqId);
38
41
} else if (!Self->Data ->BeginCommittingBlobSeqId (agent, blobSeqId)) {
39
42
FailedBlobSeqIds.insert (blobSeqId);
43
+ } else {
44
+ AllowedBlobSeqIds.insert (blobSeqId);
40
45
}
41
46
BlobSeqIds.push_back (blobSeqId);
42
47
}
@@ -102,6 +107,8 @@ namespace NKikimr::NBlobDepot {
102
107
continue ;
103
108
}
104
109
110
+ Y_VERIFY_DEBUG_S (!CanBeCollectedBlobSeqIds.contains (blobSeqId), " BlobSeqId# " << blobSeqId);
111
+
105
112
TString error;
106
113
if (!CheckKeyAgainstBarrier (key, &error)) {
107
114
responseItem->SetStatus (NKikimrProto::ERROR);
@@ -121,6 +128,15 @@ namespace NKikimr::NBlobDepot {
121
128
responseItem->SetStatus (NKikimrProto::RACE);
122
129
}
123
130
} else {
131
+ Y_VERIFY_DEBUG_S (AllowedBlobSeqIds.contains (blobSeqId), " BlobSeqId# " << blobSeqId);
132
+ Y_VERIFY_DEBUG_S (
133
+ Self->Channels [blobSeqId.Channel ].GetLeastExpectedBlobId (generation) <= blobSeqId,
134
+ " BlobSeqId# " << blobSeqId
135
+ << " LeastExpectedBlobId# " << Self->Channels [blobSeqId.Channel ].GetLeastExpectedBlobId (generation)
136
+ << " Generation# " << generation);
137
+ Y_VERIFY_DEBUG_S (blobSeqId.Generation == generation, " BlobSeqId# " << blobSeqId << " Generation# " << generation);
138
+ Y_VERIFY_DEBUG_S (Self->Channels [blobSeqId.Channel ].SequenceNumbersInFlight .contains (blobSeqId.ToSequentialNumber ()),
139
+ " BlobSeqId# " << blobSeqId);
124
140
Self->Data ->UpdateKey (key, item, txc, this );
125
141
}
126
142
}
0 commit comments