[Good First Issue] Write Unit Tests for WALConfirmOffsetCalculator
#2367
Labels
good first issue
Good for newcomers
WALConfirmOffsetCalculator
#2367
Problem Description
The
com.automq.stream.s3.S3Storage.WALConfirmOffsetCalculator
class currently lacks comprehensive unit tests.Required Changes
S3Storage
sendsappend
requests to the WAL, but the WAL does not guarantee the order of persistence completion (earlier requests may complete later).S3Storage
confirms that all requests prior to a specific offset have been persisted and uploaded to S3, it calls the WAL'strim
method to discard data before that offset.WALConfirmOffsetCalculator
implements a near-optimal algorithm to determine the current confirm offset. It prioritizes low overhead (O(n)) over perfect accuracy or immediacy.calculate
method (consider modifying method visibility for testability if needed).The text was updated successfully, but these errors were encountered: