@@ -483,7 +483,7 @@ private CompletableFuture<ReadDataBlock> read0(FetchContext context,
483
483
}
484
484
return new ReadDataBlock (rst , blockCacheRst .getCacheAccessType ());
485
485
}).whenComplete ((rst , ex ) -> {
486
- timeout . cancel ( );
486
+ handleTimeout ( timeout , streamId , startOffset , finalEndOffset , maxBytes );
487
487
if (ex != null ) {
488
488
LOGGER .error ("read from block cache failed, stream={}, {}-{}, maxBytes: {}" ,
489
489
streamId , startOffset , finalEndOffset , maxBytes , ex );
@@ -492,6 +492,15 @@ private CompletableFuture<ReadDataBlock> read0(FetchContext context,
492
492
});
493
493
}
494
494
495
+ private void handleTimeout (Timeout timeout , long streamId , long startOffset , long finalEndOffset , int maxBytes ) {
496
+ if (timeout .isExpired ()) {
497
+ LOGGER .error ("[POTENTIAL_BUG_RECOVERED] read from block cache completed, stream={}, [{},{}), maxBytes: {}" ,
498
+ streamId , startOffset , finalEndOffset , maxBytes );
499
+ } else {
500
+ timeout .cancel ();
501
+ }
502
+ }
503
+
495
504
private void continuousCheck (List <StreamRecordBatch > records ) {
496
505
long expectStartOffset = -1L ;
497
506
for (StreamRecordBatch record : records ) {
0 commit comments