@@ -460,6 +460,7 @@ class TPartitionWriter: public TActorBootstrapped<TPartitionWriter>, private TRl
460460 auto writeValid = (PendingWrite.empty () || PendingWrite.back () < cookie);
461461
462462 if (!(pendingValid && reserveValid && writeValid)) {
463+ ERROR (" The cookie of WriteRequest is invalid. Cookie=" << cookie);
463464 Disconnected (EErrorCode::InternalError);
464465 return false ;
465466 }
@@ -522,12 +523,14 @@ class TPartitionWriter: public TActorBootstrapped<TPartitionWriter>, private TRl
522523
523524 void EnqueueReservedAndProcess (ui64 cookie) {
524525 if (PendingReserve.empty ()) {
526+ ERROR (" The state of the PartitionWriter is invalid. PendingReserve is empty. Marker #01" );
525527 Disconnected (EErrorCode::InternalError);
526528 return ;
527529 }
528530 auto it = PendingReserve.begin ();
529531
530532 if (it->first != cookie) {
533+ ERROR (" The order of reservation is invalid. Cookie=" << cookie << " , ReserveCookie=" << it->first );
531534 Disconnected (EErrorCode::InternalError);
532535 return ;
533536 }
@@ -596,6 +599,7 @@ class TPartitionWriter: public TActorBootstrapped<TPartitionWriter>, private TRl
596599
597600 void Write (ui64 cookie) {
598601 if (PendingReserve.empty ()) {
602+ ERROR (" The state of the PartitionWriter is invalid. PendingReserve is empty. Marker #02" );
599603 Disconnected (EErrorCode::InternalError);
600604 return ;
601605 }
@@ -604,6 +608,7 @@ class TPartitionWriter: public TActorBootstrapped<TPartitionWriter>, private TRl
604608 auto cookieReserveValid = (it->first == cookie);
605609 auto cookieWriteValid = (PendingWrite.empty () || PendingWrite.back () < cookie);
606610 if (!(cookieReserveValid && cookieWriteValid)) {
611+ ERROR (" The cookie of Write is invalid. Cookie=" << cookie);
607612 Disconnected (EErrorCode::InternalError);
608613 return ;
609614 }
@@ -655,6 +660,7 @@ class TPartitionWriter: public TActorBootstrapped<TPartitionWriter>, private TRl
655660 WriteAccepted (cookie);
656661
657662 if (PendingReserve.empty ()) {
663+ ERROR (" The state of the PartitionWriter is invalid. PendingReserve is empty. Marker #03" );
658664 Disconnected (EErrorCode::InternalError);
659665 return ;
660666 }
0 commit comments