Skip to content
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

2 Workers with same tag cause events to be duplicated in worker #44

Open
Grokzen opened this issue Jun 4, 2015 · 2 comments
Open

2 Workers with same tag cause events to be duplicated in worker #44

Grokzen opened this issue Jun 4, 2015 · 2 comments

Comments

@Grokzen
Copy link
Contributor

Grokzen commented Jun 4, 2015

So i was implementing a new worker that i was going to use to send some events based on what function was runned on the minion to a new backend service. What i noticed was that when i was using 2 workers with the same tag tag: salt/job/[0-9]*/ret/\w+ in this case, i noticed something really strange. For each event that eventsd got from salt eventbus, eventsd would send 2 events into the worker send_batch(self, events): method. Also the same set of 2 events would be sent to both workers. I would guess that this has something to do with how events is filtered out and matched against the config for each worker.

The expected result would be that for each event, it would be sent once to each worker no matter how many workers that is using the same tag config.

@Grokzen Grokzen changed the title 2 Workers with same tag duplicates events 2 Workers with same tag cause events to be duplicated in worker Jun 4, 2015
@felskrone
Copy link
Owner

Just fyi, if you NEED this fixed, i would suggest debugging it a little more yourself. Im getting ready for vacation soon and will be gone for a few weeks. Sorry!

@Grokzen
Copy link
Contributor Author

Grokzen commented Jun 10, 2015

There is no problems right now after i merged the 2 workers i had into 1 and used the filtering logic for the used event in there and now everything works. I wanted to have 2 workers to make it easier to understand the purpose of each worker but it really do not matter :p

I have been looking around in the code some and i think i can fix it and submit a PR for you to view later when you have time after your vacation :]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants