Skip to content

Conversation

@majialoong
Copy link
Contributor

This PR fixed the time comparison logic in
CoordinatorRuntime#maybeFlushCurrentBatch to ensure that the batch is
flushed when the elapsed time since appendTimeMs exceeds the
appendLingerMs parameter.

This issue is also mentioned here.

The fix for this issue was originally in this PR in the trunk branch, which was backported to the 4.0 branch.

@majialoong
Copy link
Contributor Author

When backporting the fix for this issue from trunk to 4.0, some code differences necessitated some changes.

Compared to the changes in the trunk branch, the changes in this pull request are as follows:

  1. In the 4.0 branch, the fix for this issue triggered a JavaNCSS error, so the CoordinatorRuntimeTest class was suppressed in checkstyle/suppressions.xml.

  2. In the 4.0 branch, the MockTimer#size method does not remove canceled tasks. Therefore, when determining whether a linger task is canceled, the number of tasks is not used. Instead, the linger task is directly retrieved and the cancellation is determined.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants