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

buddy should not create table in parallel #1301

Closed
githubmanticore opened this issue Aug 1, 2023 · 4 comments
Closed

buddy should not create table in parallel #1301

githubmanticore opened this issue Aug 1, 2023 · 4 comments

Comments

@githubmanticore
Copy link
Contributor

Logstash sends batch of request into daemon and sends some batches in parallel multiple requests and daemon routes all these in buddy in case no table found for auto CREATE TABLE these fails at the different stages after the table got created for the 1st request.

@githubmanticore
Copy link
Contributor Author

➤ Stan commented:

not sure how to fix that case but the simplest fix is
to use global lock at the create table buddy plugin that only one request could be processed at the time then after plugin took the lock add check under the lock that table really missed at the daemon - to make sure that previous request released the lock just not created the table already.

@githubmanticore
Copy link
Contributor Author

➤ Sergey Nikolaev commented:

to use global lock at the create table buddy plugin

Makes sense to me. @donhardman how feasible is this?

@githubmanticore
Copy link
Contributor Author

➤ Sergey Nikolaev commented:

Decided to handle it on the daemon's side by executing CREATE TABLE through a lock.

@githubmanticore
Copy link
Contributor Author

➤ Stan commented:

should be fixed at 052bf89 where code at the CREATE TABLE protected by global coro mutex and only one worker allowed to pass

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

No branches or pull requests

2 participants