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
HSEARCH-4736 Add offloading operation submitter #3400
HSEARCH-4736 Add offloading operation submitter #3400
Conversation
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.
Thanks. I pushed two commits and explained why in the comments. I also have a few other comments, see below.
...g/hibernate/search/backend/lucene/orchestration/impl/LuceneParallelWorkOrchestratorImpl.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/org/hibernate/search/engine/backend/work/execution/OperationSubmitter.java
Outdated
Show resolved
Hide resolved
...ain/java/org/hibernate/search/engine/backend/orchestration/spi/AbstractWorkOrchestrator.java
Outdated
Show resolved
Hide resolved
...a/org/hibernate/search/backend/lucene/orchestration/impl/LuceneSyncWorkOrchestratorImpl.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/hibernate/search/engine/backend/orchestration/spi/BatchingExecutorTest.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/org/hibernate/search/engine/backend/work/execution/OperationSubmitter.java
Show resolved
Hide resolved
...e/search/backend/elasticsearch/orchestration/impl/ElasticsearchBatchingWorkOrchestrator.java
Outdated
Show resolved
Hide resolved
f443347
to
1aa3dc5
Compare
...ne/src/main/java/org/hibernate/search/engine/backend/orchestration/spi/BatchingExecutor.java
Show resolved
Hide resolved
engine/src/main/java/org/hibernate/search/engine/backend/work/execution/OperationSubmitter.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/org/hibernate/search/engine/backend/work/execution/OperationSubmitter.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/hibernate/search/engine/common/execution/spi/SimpleScheduledExecutor.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/org/hibernate/search/engine/backend/work/execution/OperationSubmitter.java
Outdated
Show resolved
Hide resolved
1aa3dc5
to
0613405
Compare
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, just a few resource leak in tests. Feel free to merge after they're addressed. Thanks!
...rc/test/java/org/hibernate/search/engine/backend/orchestration/spi/BatchingExecutorTest.java
Outdated
Show resolved
Hide resolved
.../java/org/hibernate/search/engine/backend/work/execution/OperationSubmitterExecutorTest.java
Show resolved
Hide resolved
...ne/src/main/java/org/hibernate/search/engine/backend/orchestration/spi/BatchingExecutor.java
Show resolved
Hide resolved
0613405
to
cf14b73
Compare
cf14b73
to
e2f3d49
Compare
SonarCloud Quality Gate failed. |
https://hibernate.atlassian.net/browse/HSEARCH-4736
I've tried to keep
OperationSubmitter
closed for the users, so they are forced to use whatever is provided with Search.Also, with this new submitter type, it is somewhat possible to offload work in
LuceneSyncWorkOrchestratorImpl
but I wasn't sure if that's something worth supporting, so I left it more on the "idea level".I've kept the same "hacks" for the BatchExecutor test as in the blocking case as it seems we might stumble upon the same issue with offloading.