@@ -759,8 +759,40 @@ class TReadRowsRPC : public TActorBootstrapped<TReadRowsRPC> {
759
759
}
760
760
761
761
void HandleTimeout (TEvents::TEvWakeup::TPtr&) {
762
- ReplyWithError (Ydb::StatusIds::TIMEOUT, TStringBuilder () << " ReadRows from table " << GetTable ()
763
- << " timed out, duration: " << (TAppData::TimeProvider->Now () - StartTime).Seconds () << " sec" );
762
+ TString errorMessage = TStringBuilder () << " ReadRows from table " << GetTable ()
763
+ << " timed out, duration: " << (TAppData::TimeProvider->Now () - StartTime).Seconds () << " sec\n " ;
764
+
765
+ auto errorLog = TStringBuilder () << " ShardIdToReadState: {" ;
766
+
767
+ ui64 rowsRequested = 0 ;
768
+ bool first = true ;
769
+ for (const auto & [shardId, readState] : ShardIdToReadState) {
770
+ if (!first) {
771
+ errorLog << " , " ;
772
+ }
773
+ first = false ;
774
+ errorLog << " {"
775
+ << " ShardId: " << shardId
776
+ << " Status: " << readState.Status
777
+ << " ContinuationToken: " << readState.FirstUnprocessedQuery
778
+ << " }" ;
779
+
780
+ rowsRequested += readState.Keys .size ();
781
+ }
782
+ errorLog << " }\n " ;
783
+
784
+ ui64 rowsRead = 0 ;
785
+ for (auto & result : EvReadResults) {
786
+ rowsRead += result->GetRowsCount ();
787
+ }
788
+
789
+ errorLog << " ReadsInFlight: " << ReadsInFlight << ' \n ' ;
790
+ errorLog << " Retries: " << Retries << ' \n ' ;
791
+ errorLog << " Rows requested: " << rowsRequested << ' \n ' ;
792
+ errorLog << " Rows read: " << rowsRead << ' \n ' ;
793
+ errorLog << " Estimated RuCost: " << RuCost << ' \n ' ;
794
+ ReplyWithError (Ydb::StatusIds::TIMEOUT, errorMessage);
795
+ LOG_ERROR_S (TlsActivationContext->AsActorContext (), NKikimrServices::RPC_REQUEST, " TReadRowsRPC HandleTimeout actor state: " << errorLog);
764
796
}
765
797
766
798
void HandleForget (TRpcServices::TEvForgetOperation::TPtr& ev) {
0 commit comments