@@ -96,7 +96,15 @@ void TBlobState::AddResponseData(const TBlobStorageGroupInfo &info, const TLogoB
96
96
const ui32 diskIdx = info.GetIdxInSubgroup (info.GetVDiskId (orderNumber), id.Hash ());
97
97
Y_ABORT_UNLESS (diskIdx != info.Type .BlobSubgroupSize ());
98
98
TDisk& disk = Disks[diskIdx];
99
- Y_ABORT_UNLESS (disk.OrderNumber == orderNumber);
99
+
100
+ Y_VERIFY_S (disk.OrderNumber == orderNumber, " AddResponseData, disk.OrderNumber != orderNumber"
101
+ << " blobId# " << id
102
+ << " shift# " << shift
103
+ << " size# " << data.size ()
104
+ << " VDiskId# " << info.GetVDiskId (orderNumber)
105
+ << " diskIdx# " << diskIdx
106
+ << " disk# " << disk.ToString ()
107
+ << " orderNumber# " << orderNumber);
100
108
101
109
// Mark part as present for the disk
102
110
Y_ABORT_UNLESS (partIdx < disk.DiskParts .size ());
@@ -116,7 +124,13 @@ void TBlobState::AddNoDataResponse(const TBlobStorageGroupInfo &info, const TLog
116
124
const ui32 diskIdx = info.GetIdxInSubgroup (info.GetVDiskId (orderNumber), id.Hash ());
117
125
Y_ABORT_UNLESS (diskIdx != info.Type .BlobSubgroupSize ());
118
126
TDisk& disk = Disks[diskIdx];
119
- Y_ABORT_UNLESS (disk.OrderNumber == orderNumber);
127
+
128
+ Y_VERIFY_S (disk.OrderNumber == orderNumber, " AddNoDataResponse, disk.OrderNumber != orderNumber"
129
+ << " blobId# " << id
130
+ << " VDiskId# " << info.GetVDiskId (orderNumber)
131
+ << " diskIdx# " << diskIdx
132
+ << " disk# " << disk.ToString ()
133
+ << " orderNumber# " << orderNumber);
120
134
121
135
Y_ABORT_UNLESS (partIdx < disk.DiskParts .size ());
122
136
TDiskPart &diskPart = disk.DiskParts [partIdx];
@@ -132,7 +146,13 @@ void TBlobState::AddPutOkResponse(const TBlobStorageGroupInfo &info, const TLogo
132
146
const ui32 diskIdx = info.GetIdxInSubgroup (info.GetVDiskId (orderNumber), id.Hash ());
133
147
Y_ABORT_UNLESS (diskIdx != info.Type .BlobSubgroupSize ());
134
148
TDisk& disk = Disks[diskIdx];
135
- Y_ABORT_UNLESS (disk.OrderNumber == orderNumber);
149
+
150
+ Y_VERIFY_S (disk.OrderNumber == orderNumber, " AddPutOkResponse, disk.OrderNumber != orderNumber"
151
+ << " blobId# " << id
152
+ << " VDiskId# " << info.GetVDiskId (orderNumber)
153
+ << " diskIdx# " << diskIdx
154
+ << " disk# " << disk.ToString ()
155
+ << " orderNumber# " << orderNumber);
136
156
137
157
Y_ABORT_UNLESS (partIdx < disk.DiskParts .size ());
138
158
TDiskPart& diskPart = disk.DiskParts [partIdx];
@@ -148,7 +168,14 @@ void TBlobState::AddErrorResponse(const TBlobStorageGroupInfo &info, const TLogo
148
168
const ui32 diskIdx = info.GetIdxInSubgroup (info.GetVDiskId (orderNumber), id.Hash ());
149
169
Y_ABORT_UNLESS (diskIdx != info.Type .BlobSubgroupSize ());
150
170
TDisk& disk = Disks[diskIdx];
151
- Y_ABORT_UNLESS (disk.OrderNumber == orderNumber);
171
+
172
+ Y_VERIFY_S (disk.OrderNumber == orderNumber, " AddErrorResponse, disk.OrderNumber != orderNumber"
173
+ << " blobId# " << id
174
+ << " errorReason# " << errorReason
175
+ << " VDiskId# " << info.GetVDiskId (orderNumber)
176
+ << " diskIdx# " << diskIdx
177
+ << " disk# " << disk.ToString ()
178
+ << " orderNumber# " << orderNumber);
152
179
153
180
Y_ABORT_UNLESS (partIdx < disk.DiskParts .size ());
154
181
TDiskPart &diskPart = disk.DiskParts [partIdx];
@@ -165,7 +192,13 @@ void TBlobState::AddNotYetResponse(const TBlobStorageGroupInfo &info, const TLog
165
192
const ui32 diskIdx = info.GetIdxInSubgroup (info.GetVDiskId (orderNumber), id.Hash ());
166
193
Y_ABORT_UNLESS (diskIdx != info.Type .BlobSubgroupSize ());
167
194
TDisk& disk = Disks[diskIdx];
168
- Y_ABORT_UNLESS (disk.OrderNumber == orderNumber);
195
+
196
+ Y_VERIFY_S (disk.OrderNumber == orderNumber, " AddNotYetResponse, disk.OrderNumber != orderNumber"
197
+ << " blobId# " << id
198
+ << " VDiskId# " << info.GetVDiskId (orderNumber)
199
+ << " diskIdx# " << diskIdx
200
+ << " disk# " << disk.ToString ()
201
+ << " orderNumber# " << orderNumber);
169
202
170
203
Y_ABORT_UNLESS (partIdx < disk.DiskParts .size ());
171
204
TDiskPart &diskPart = disk.DiskParts [partIdx];
@@ -400,35 +433,35 @@ void TBlackboard::AddPartToPut(const TLogoBlobID &id, ui32 partIdx, TRope&& part
400
433
void TBlackboard::AddPutOkResponse (const TLogoBlobID &id, ui32 orderNumber) {
401
434
Y_ABORT_UNLESS (bool (id));
402
435
Y_ABORT_UNLESS (id.PartId () != 0 );
403
- TBlobState &state = GetState (id);
436
+ TBlobState &state = GetState (id, orderNumber, " AddPutOkResponse " );
404
437
state.AddPutOkResponse (*Info, id, orderNumber);
405
438
}
406
439
407
440
void TBlackboard::AddResponseData (const TLogoBlobID &id, ui32 orderNumber, ui32 shift, TRope&& data) {
408
441
Y_ABORT_UNLESS (bool (id));
409
442
Y_ABORT_UNLESS (id.PartId () != 0 );
410
- TBlobState &state = GetState (id);
443
+ TBlobState &state = GetState (id, orderNumber, " AddResponseData " );
411
444
state.AddResponseData (*Info, id, orderNumber, shift, std::move (data));
412
445
}
413
446
414
447
void TBlackboard::AddNoDataResponse (const TLogoBlobID &id, ui32 orderNumber) {
415
448
Y_ABORT_UNLESS (bool (id));
416
449
Y_ABORT_UNLESS (id.PartId () != 0 );
417
- TBlobState &state = GetState (id);
450
+ TBlobState &state = GetState (id, orderNumber, " AddNoDataResponse " );
418
451
state.AddNoDataResponse (*Info, id, orderNumber);
419
452
}
420
453
421
454
void TBlackboard::AddNotYetResponse (const TLogoBlobID &id, ui32 orderNumber) {
422
455
Y_ABORT_UNLESS (bool (id));
423
456
Y_ABORT_UNLESS (id.PartId () != 0 );
424
- TBlobState &state = GetState (id);
457
+ TBlobState &state = GetState (id, orderNumber, " AddNotYetResponse " );
425
458
state.AddNotYetResponse (*Info, id, orderNumber);
426
459
}
427
460
428
461
void TBlackboard::AddErrorResponse (const TLogoBlobID &id, ui32 orderNumber, const TString& errorReason) {
429
462
Y_ABORT_UNLESS (bool (id));
430
463
Y_ABORT_UNLESS (id.PartId () != 0 );
431
- TBlobState &state = GetState (id);
464
+ TBlobState &state = GetState (id, orderNumber, " AddErrorResponse " );
432
465
state.AddErrorResponse (*Info, id, orderNumber, errorReason);
433
466
}
434
467
@@ -493,22 +526,24 @@ EStrategyOutcome TBlackboard::RunStrategy(TLogContext &logCtx, const IStrategy&
493
526
return RunStrategies (logCtx, {const_cast <IStrategy*>(&s)}, accelerationParams, finished, expired);
494
527
}
495
528
496
- TBlobState& TBlackboard::GetState (const TLogoBlobID &id) {
529
+ TBlobState& TBlackboard::GetState (const TLogoBlobID &id, ui32 orderNumber, const char * origin ) {
497
530
Y_ABORT_UNLESS (bool (id));
498
531
TLogoBlobID fullId = id.FullID ();
499
532
auto it = BlobStates.find (fullId);
500
533
if (it == BlobStates.end ()) {
501
534
it = DoneBlobStates.find (fullId);
502
535
Y_VERIFY_S (it != DoneBlobStates.end (), " The blob was not found in BlobStates and DoneBlobStates"
536
+ << " from " << origin
503
537
<< " blobId# " << fullId
538
+ << " orderNumber# " << orderNumber
504
539
<< " BlackBoard# " << ToString ());
505
540
}
506
541
return it->second ;
507
542
}
508
543
509
544
ssize_t TBlackboard::AddPartMap (const TLogoBlobID &id, ui32 diskOrderNumber, ui32 requestIndex) {
510
545
Y_ABORT_UNLESS (id);
511
- TBlobState &state = GetState (id);
546
+ TBlobState &state = GetState (id, diskOrderNumber, " AddPartMap " );
512
547
ssize_t ret = state.PartMap .size ();
513
548
state.PartMap .emplace_back (TEvBlobStorage::TEvGetResult::TPartMapItem{
514
549
diskOrderNumber,
@@ -523,7 +558,7 @@ ssize_t TBlackboard::AddPartMap(const TLogoBlobID &id, ui32 diskOrderNumber, ui3
523
558
void TBlackboard::ReportPartMapStatus (const TLogoBlobID &id, ssize_t partMapIndex, ui32 responseIndex, NKikimrProto::EReplyStatus status) {
524
559
Y_ABORT_UNLESS (id);
525
560
Y_ABORT_UNLESS (partMapIndex >= 0 );
526
- TBlobState &state = GetState (id);
561
+ TBlobState &state = GetState (id, 0xff , " ReportPartMapStatus " );
527
562
Y_ABORT_UNLESS (static_cast <size_t >(partMapIndex) < state.PartMap .size ());
528
563
TEvBlobStorage::TEvGetResult::TPartMapItem &item = state.PartMap [partMapIndex];
529
564
Y_ABORT_UNLESS (item.ResponseIndex == responseIndex || item.ResponseIndex == Max<ui32>());
0 commit comments