-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
simplify batch classes, do not compute JE empty batches, refactor RE worker loop #11737
Conversation
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.
Nice refactoring Colin it's nice to see more typed data structures and less array manipulations, I've left a couple of notes
logstash-core/src/main/java/org/logstash/ackedqueue/AckedBatch.java
Outdated
Show resolved
Hide resolved
logstash-core/src/main/java/org/logstash/ackedqueue/AckedReadBatch.java
Outdated
Show resolved
Hide resolved
Ok, bare with me here - I managed to make a bit more changes than I originally intended. Basically the last set of changes have to do with the removing of the |
Globally LGTM there is only another location where merge it's used and make the Ruby's unit tests fail |
@andsel Yikes - Missed that one. Fixed! |
…worker loop cleanup RubyArray "rawtypes" remove all LinkedHashSet from batch and queue classes avoid processing empty batches in Java worker loop cleanup AckedReadBatch and MemoryReadBatch refactor Ruby worker loop similar to Java Execution to not use batch merge remove QueueBatch merge and replace LinkedHashSet with ArrayList
55960b7
to
4a06ea3
Compare
…worker loop (#11746) 7.x clean backport or #11737 cleanup RubyArray "rawtypes" remove all LinkedHashSet from batch and queue classes avoid processing empty batches in Java worker loop cleanup AckedReadBatch and MemoryReadBatch refactor Ruby worker loop similar to Java Execution to not use batch merge remove QueueBatch merge and replace LinkedHashSet with ArrayList
After elastic/logstash#11737 was committed, plugin unit tests using `sample` targeted against branches with this change merged were failing due to the lack of `events` method on the QueueBatchDelegator. This commit adds an `events` method to fix the failing tests.
This was merged in master with 5a25c6f - closing. |
This is a followup to #11710 with some cleanups.
RubyArray
"rawtypes" and "unchecked"@SuppressWarnings
AckedReadBatch
CompiledExecution#compute
methods signature to use aCollection
instead ofRubyArray
.RubyArray
in a few places.WorkerLoop
which happens when the queue read reaches the timeout.QueueBatch#merge
methodLinkedHashSet
toArrayList
inMemoryReadBatch
andAckedReadBatch
merge