-
Couldn't load subscription status.
- Fork 947
Rename RequestBatchBuffer methods from 'flushable' to 'extract' to clarify it doesn't do the flushing #6485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…arify it doesn't do the flushing
| flushBuffer(batchKey, flushableRequests); | ||
| while (!extractedEntries.isEmpty()) { | ||
| flushBuffer(batchKey, extractedEntries); | ||
| extractedEntries = requestsAndResponsesMaps.extractBatchIfReady(batchKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this line is new, is this expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was not intended , copy paste error from line 167
|
|
This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one. |



Motivation and Context
The
RequestBatchBufferclass had confusing method names that suggested it was responsible for flushing entries, when it actually just extracts them from the buffer. The actual flushing is done byRequestBatchManager. This was done to handle comment from #5418 (comment)Modifications
Renamed three public methods in
RequestBatchBufferto better reflect what they actually do:flushableRequests()→extractBatchIfReady()- extracts entries when batch is full or size limit reachedflushableRequestsOnByteLimitBeforeAdd()→extractBatchIfSizeExceeded()- extracts entries before adding a new request if size would be exceededflushableScheduledRequests()→extractEntriesForScheduledFlush()- extracts entries during scheduled flushAlso renamed the private helper method
extractFlushedEntries()toextractEntries()for consistency.Updated all callers in
BatchingMap,RequestBatchManager, and test files to use the new method names.Testing
Ran the full SQS module test suite with
mvn clean install -pl :sqs -P quick --am -rf :sqs.License