@@ -759,8 +759,41 @@ 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 () << " TableName: " << GetTable () << ' \n ' ;
766
+
767
+ errorLog << " ShardIdToReadState: {" ;
768
+ ui64 rowsRequested = 0 ;
769
+ bool first = true ;
770
+ for (const auto & [shardId, readState] : ShardIdToReadState) {
771
+ if (!first) {
772
+ errorLog << " , " ;
773
+ }
774
+ first = false ;
775
+ errorLog << " {"
776
+ << " ShardId: " << shardId
777
+ << " Status: " << readState.Status
778
+ << " ContinuationToken: " << readState.FirstUnprocessedQuery
779
+ << " }" ;
780
+
781
+ rowsRequested += readState.Keys .size ();
782
+ }
783
+ errorLog << " }\n " ;
784
+
785
+ ui64 rowsRead = 0 ;
786
+ for (auto & result : EvReadResults) {
787
+ rowsRead += result->GetRowsCount ();
788
+ }
789
+
790
+ errorLog << " ReadsInFlight: " << ReadsInFlight << ' \n ' ;
791
+ errorLog << " Retries: " << Retries << ' \n ' ;
792
+ errorLog << " Rows requested: " << rowsRequested << ' \n ' ;
793
+ errorLog << " Rows read: " << rowsRead << ' \n ' ;
794
+ errorLog << " Estimated RuCost: " << RuCost << ' \n ' ;
795
+ ReplyWithError (Ydb::StatusIds::TIMEOUT, errorMessage);
796
+ LOG_ERROR_S (TlsActivationContext->AsActorContext (), NKikimrServices::RPC_REQUEST, " TReadRowsRPC HandleTimeout actor state: " << errorLog);
764
797
}
765
798
766
799
void HandleForget (TRpcServices::TEvForgetOperation::TPtr& ev) {
0 commit comments