Closed superhx closed 5 months ago
Another scenario:
Why is RangeRecord not generated to advance the endOffset of the range when uploading an object? The StreamSetObject contains thousands of streams, if we do so, the controller will generate too many records.
Another scenario:
- Stream advances endOffset to 12 and triggers upload objectId=0.
- Stream advances endOffset to 24 and triggers upload objectId=1.
- Stream trims to 24, objectId=0 still has unexpired data from other streams, and all data in objectId=1 is expired. So objectId=1 was deleted
- Controller restarts, and the stream's range endOffset can only be replayed to 12.
- Stream advances endOffset to 36 and triggers upload objectId=2, but 24 does not match 12, resulting in OFFSET_NOT_MATCH error.
In the 'trim progress exceeds upload progress' scenario, the range endOffset may experience a bounce back.
Retrieving and Checking Logic of endOffset: Old:
The Fix:
What went wrong?
Partition __consumer_offsets-27 encountered an UNCLEAN SHUTDOWN during the recovery process. An error occurred during the Time Index recovery, stating that 'fetch startOffset 1980 is greater than endOffset '. This error caused the partition to be unable to open.
What is the reason?
Summary: The endOffset of stream range depends on the replay of StreamSetObject and StreamObject records, there is a problem where endOffset is smaller than startOffset in scenarios where 'trim progress exceeds upload progress'.
Detail:
Affects versions
1.0.x
Fix
Correct the nextOffset of openStream.