Comments (4)
Hi @erik-stephens,
When you use multiple workers (so multiple threads in parallel), you have no guarantee on the order of arrival of events.
So aggregate filter could process firstable event "2" and then event "1".
That's what happens in your second result document.
And in your third result document, the "finished" event is processed before "start" event so you get only "finished" as result "message" field (no aggregation is done because "map_action=update" condition is not met).
So, because aggregate filter is dependant from order of arrival of events, you have to use only one worker to have a nice behaviour.
A tip that I can give to you to have multiple events processed at the same time (for performance needs) : you could start several logstash instances, each instance will read one input (on file, one tcp port, ...). Like that each instance has one worker ; but globally, you have as many workers as logstash instances.
from logstash-filter-aggregate.
I saw the mutex code and thought that was to support multiple worker threads. Do you or anyone else know what that is for? I want to make sure I understand that when working on #14. Thanks.
from logstash-filter-aggregate.
Hi @erik-stephens,
Actually, I am the creator of this plugin, so I know very well each line of code ;)
Globally (not just for this plugin), Thread-safety is something important to me.
So, from the beginning, I make the plugin code thread-safe.
It could be really useful if you can be sure that for one task id, all related events happen in the right order into aggregate plugin.
But presently, it is not the case.
There are some plans in logstash roadmap to support multiple pipelines in one logstash instance.
This could be a start point for that.
I would really enjoy, if I could specify one worker thread per tag, given that tag is positioned by input. Using that, I could really support multiple workers.
But today, technically, code is thread-safe (it won't raise an exception with multiple threads), but functionally, it is not thread-safe.
from logstash-filter-aggregate.
Thanks for the explanation. I think I understand now.
from logstash-filter-aggregate.
Related Issues (20)
- Documentation update for use case 4 HOT 9
- Error with aggregate_maps_path HOT 3
- multiple aggregate with different task_id confused HOT 2
- [@metadata][something] missing in aggregated event HOT 5
- Logstash filter Aggregate with multiple fields
- Need able to aggregate the inner structure HOT 6
- Logstash automatically loading the config file HOT 1
- [UPDATE QUERY] - pushes same data multiple times in nested array json HOT 8
- NoMethodError: undefined method `multi_filter' for nil:NilClass HOT 3
- Timeout values of one aggregate block affect another aggregate block (with different task_id pattern) HOT 4
- final flusher does not flush event when push_map_as_event_on_timeout used HOT 3
- how to split jdbc result and then migrating to nested array HOT 5
- testing aggregates => LogStash::ConfigurationError: Aggregate plugin: more than one filter which defines timeout options. But only defining once. HOT 3
- Pipeline crash if timeout_timestamp_field is missing from event HOT 3
- Pipeline crash when the aggregate maps is loaded from a file.aggregate
- Aggregate + JDBC HOT 6
- Can't set timeout value based on event filed or metadata HOT 4
- How can i aggregate fix amount of events ? HOT 9
- Aggregate non ordered logs, array of value HOT 7
- aggregate nested not work HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logstash-filter-aggregate.