[BUG] StreamReader timeout
Closed this issue · 1 comments
superhx commented
[2024-06-05 07:34:28,941] ERROR [POTENTIAL_BUG] read from block cache timeout, stream=161329, [292951,292957), maxBytes: 1048576 (com.automq.stream.s3.S3Storage)
[arthas@321881]$ watch com.automq.stream.s3.cache.blockcache.StreamReader getBlocks0 '{params[1],target.blocksMap.firstEntry()}' -n 1 -x 2
method=com.automq.stream.s3.cache.blockcache.StreamReader.getBlocks0 location=AtExit
ts=2024-06-05 11:36:26; [cost=0.279973ms] result=@ArrayList[
@Long[292951],
@SimpleImmutableEntry[
serialVersionUID=@Long[7138329143949025153],
key=@Long[293431],
value=@Block[com.automq.stream.s3.cache.blockcache.StreamReader$Block@1b388394],
],
]
superhx commented
Reason for the problem: During the execution of StreamReader#loadMoreBlocksWithoutData0, StreamReader#resetBlocks is interleaved, causing gaps between the blocks inserted by StreamReader#loadMoreBlocksWithoutData0 and nextReadOffset.