-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Remove global block factory #100108
Remove global block factory #100108
Conversation
@nik9000 EsqlDisruptionIT seems to fail more frequently on your machine compared to mine, possibly due to the different number of CPUs. I was able to reproduce reliably the problem on my machine using |
Pinging @elastic/es-ql (Team:QL) |
Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL) |
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.
LGTM - less code and easier to track it down.
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.
LGTM
@costin @ChrisHegarty Thanks for reviewing. |
The global BlockFactory should work fine in production, where each Elasticsearch node runs in its own JVM process. However, this approach can lead to issues during testing, especially in IT tests. The same JVM process might get reused across multiple tests, resulting in situations where multiple IT tests inadvertently use the same instance of the global BlockFactory. For instance, EsqlDisruptionIT fails because it accidentally uses the global BlockFactory initialized by EsqlActionBreakerIT, which has a limit set to 1KB. Another issue in IT tests is that multiple Elasticsearch nodes can share the same (single) global instance of the BlockFactory. Closes elastic#100105
The global BlockFactory should work fine in production, where each Elasticsearch node runs in its own JVM process. However, this approach can lead to issues during testing, especially in IT tests. The same JVM process might get reused across multiple tests, resulting in situations where multiple IT tests inadvertently use the same instance of the global BlockFactory. For instance, EsqlDisruptionIT fails because it accidentally uses the global BlockFactory initialized by EsqlActionBreakerIT, which has a limit set to 1KB. Another issue in IT tests is that multiple Elasticsearch nodes can share the same (single) global instance of the BlockFactory. Closes elastic#100105
The global BlockFactory should work fine in production, where each Elasticsearch node runs in its own JVM process. However, this approach can lead to issues during testing, especially in IT tests. The same JVM process might get reused across multiple tests, resulting in situations where multiple IT tests inadvertently use the same instance of the global BlockFactory.
For instance, EsqlDisruptionIT fails because it accidentally uses the global BlockFactory initialized by EsqlActionBreakerIT, which has a limit set to 1KB. Another issue in IT tests is that multiple Elasticsearch nodes can share the same (single) global instance of the BlockFactory.
Closes #100105
This PR suggests removing the global BlockFactory since we are already passing it with the DriverContext.