Environment
Topic configurationRetention: {
"retentionTimeInMinutes": 5300000,
"retentionSizeInMB": -1
}TTL:
Offload (S3): {
"managedLedgerOffloadThresholdInSeconds": 259200,
"managedLedgerOffloadThresholdInBytes": 1073741824,
"managedLedgerOffloadMaxThreads": 2,
"managedLedgerOffloadReadThreads": 2,
"managedLedgerOffloadPrefetchRounds": 1,
"s3ManagedLedgerOffloadMaxBlockSizeInBytes": 67108864,
"s3ManagedLedgerOffloadReadBufferSizeInBytes": 1048576
}ProblemA reader that starts from Given the long retention period and the offload configuration, a significant portion of the messages are offloaded to S3. The incomplete runs seem to correlate with the reader failing to read some or all of the offloaded ledgers. Reproduction dataWe ran the reader 10 times consecutively. 4 out of 10 runs returned incomplete results:
The "OK" runs after 12:00 return 24,756 (= 24,747 + 9 new messages), confirming that all messages are present and retention is not the issue. The incomplete runs return wildly varying counts (2,647 to 9,281), suggesting the reader silently stops or skips ledgers rather than producing an error. Key finding: extending TTL eliminates the problemAfter extending the TTL from 2 weeks to 1 year (so that the TTL boundary is well beyond the oldest message in the topic), we can no longer reproduce the issue. All reader runs return the full message count. This strongly suggests that the TTL expiry background task interferes with the reader when it is scanning through messages that have aged past the TTL boundary. Observations
ConcernsThis behavior raises several concerns about the Reader's contract:
Questions
Any guidance would be appreciated. Thank you! |
Replies: 3 comments
|
This seems to be a bug.
Can you reproduce this also with Python client 3.13.0? |
This seems like a correct observation. Most likely the Python client isn't involved. |
@Goodkat Thanks for the great issue report. I created this issue based on your description: #26504. The fix is in #26505.