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

Bulk functions not work as expected with more than 1 goroutines #11

Open
alexisvisco opened this issue Nov 5, 2019 · 2 comments · May be fixed by #23
Open

Bulk functions not work as expected with more than 1 goroutines #11

alexisvisco opened this issue Nov 5, 2019 · 2 comments · May be fixed by #23
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@alexisvisco
Copy link
Member

As referenced in the issue #9 the bulk function are stuck when using multiple goroutines.

The reason why I have created a bulk function is to dispatch work among multiple goroutines. If this goal is subject to unexpected behavior this code should be refactored to work properly.

@alexisvisco alexisvisco self-assigned this Nov 5, 2019
@alexisvisco alexisvisco added bug Something isn't working good first issue Good for newcomers labels Nov 5, 2019
@alexisvisco
Copy link
Member Author

alexisvisco commented Nov 5, 2019

An idea is to give access to a pool of connection by default.

Currently the driver use one connections per instance of Ingester/Search... So this is impossible to execute the Push function across multiple goroutines for the same instance.

If an instance have a pool of connections: that will solve the above problem. In addition all bulk functions would be trivial to implement.

@alexisvisco
Copy link
Member Author

Implementing a pool like that https://github.com/fatih/pool should be sufficient for all usages.
Maybe adding an dynamic increase/decrease of the number of available connections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant