Rename AbstractAsyncBulkByScrollAction to AbstractAsyncBulkByPaginatedSearchAction#149408
Rename AbstractAsyncBulkByScrollAction to AbstractAsyncBulkByPaginatedSearchAction#149408joshua-adams-1 wants to merge 2 commits into
Conversation
…dSearchAction Now that reindexing uses point-in-time search rather than scroll, all specific scroll-based references need to be generalised. This is point 5 of elastic/elasticsearch-team#2406 Relates: elastic/elasticsearch-team#2406
There was a problem hiding this comment.
Pull request overview
This PR completes the rename from AbstractAsyncBulkByScrollAction to AbstractAsyncBulkByPaginatedSearchAction across reindex/update-by-query/delete-by-query codepaths and their test infrastructure, aligning naming with the PIT/search_after-based pagination approach.
Changes:
- Renamed the core reindex “async bulk by scroll” abstraction class (and constructors) to
AbstractAsyncBulkByPaginatedSearchAction. - Updated concrete implementations and test cases to extend/reference the renamed abstraction.
- Updated Javadocs/comments and helper test base classes to use the new name.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/framework/src/main/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByPaginatedSearchActionTestCase.java | Renames the public test base class to match the file/new abstraction naming. |
| server/src/main/java/org/elasticsearch/script/UpdateMetadata.java | Updates a comment to reference the renamed abstraction (but currently references a non-existent nested type). |
| modules/reindex/src/test/java/org/elasticsearch/reindex/UpdateByQueryWithScriptTests.java | Switches script tests to the renamed script test base. |
| modules/reindex/src/test/java/org/elasticsearch/reindex/UpdateByQueryVersionTests.java | Switches metadata tests to the renamed metadata test base (formatting adjusted). |
| modules/reindex/src/test/java/org/elasticsearch/reindex/UpdateByQueryMetadataTests.java | Updates wrappers/base classes to use the renamed abstraction. |
| modules/reindex/src/test/java/org/elasticsearch/reindex/UpdateByQueryCircuitBreakerTests.java | Updates lifecycle Javadoc link to the renamed abstraction. |
| modules/reindex/src/test/java/org/elasticsearch/reindex/remote/RemoteRequestBuildersTests.java | Updates comment reference to prepareSearchRequest on the renamed abstraction. |
| modules/reindex/src/test/java/org/elasticsearch/reindex/ReindexScriptTests.java | Switches script tests to the renamed script test base. |
| modules/reindex/src/test/java/org/elasticsearch/reindex/ReindexMetadataTests.java | Updates wrapper usage and base test class to the renamed abstraction. |
| modules/reindex/src/test/java/org/elasticsearch/reindex/ReindexIdTests.java | Updates import and base test class to the renamed test base. |
| modules/reindex/src/test/java/org/elasticsearch/reindex/AsyncBulkByScrollActionTests.java | Updates many references (static import, nested types, overrides) to the renamed abstraction. |
| modules/reindex/src/test/java/org/elasticsearch/reindex/AbstractAsyncBulkByPaginatedSearchActionScriptTestCase.java | Renames the script test base class and updates wrapper/action types. |
| modules/reindex/src/test/java/org/elasticsearch/reindex/AbstractAsyncBulkByPaginatedSearchActionPitKeepaliveHttpTests.java | Renames the PIT keepalive HTTP test class and updates references. |
| modules/reindex/src/test/java/org/elasticsearch/reindex/AbstractAsyncBulkByPaginatedSearchActionMetadataTestCase.java | Renames the metadata test base class and updates the abstract action() return type. |
| modules/reindex/src/main/java/org/elasticsearch/reindex/TransportUpdateByQueryAction.java | Updates the async worker to extend the renamed abstraction. |
| modules/reindex/src/main/java/org/elasticsearch/reindex/Reindexer.java | Updates the async reindex worker to extend the renamed abstraction. |
| modules/reindex/src/main/java/org/elasticsearch/reindex/AsyncDeleteByQueryAction.java | Updates delete-by-query worker to extend the renamed abstraction. |
| modules/reindex/src/main/java/org/elasticsearch/reindex/AbstractAsyncBulkByPaginatedSearchAction.java | Renames the abstraction class/constructors and updates internal Javadoc references. |
Comments suppressed due to low confidence (2)
modules/reindex/src/test/java/org/elasticsearch/reindex/AsyncBulkByScrollActionTests.java:145
AsyncBulkByScrollActionTests(and the innerDummyAsyncBulkByScrollAction) now primarily exerciseAbstractAsyncBulkByPaginatedSearchAction, so the remaining “ByScroll” naming is misleading. Consider renaming the test class (and helper types) to match the new abstraction name to keep search/grep and future maintenance accurate.
import static org.elasticsearch.reindex.AbstractAsyncBulkByPaginatedSearchAction.computeRelocationCooldownNanos;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.either;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.hasToString;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class AsyncBulkByScrollActionTests extends ESTestCase {
private MyMockClient client;
modules/reindex/src/main/java/org/elasticsearch/reindex/AbstractAsyncBulkByPaginatedSearchAction.java:95
- The class-level Javadoc still describes this as “scrolling across a search”, which is now inconsistent with the renamed
AbstractAsyncBulkByPaginatedSearchActionand the move toward PIT/search_after pagination. Updating the wording to describe generic pagination (and optionally mentioning scroll as an implementation detail) would better match the class name and current behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // AbstractAsyncBulkByPaginatedSearchAction.OpType uses 'noop' rather than 'none', so unify on 'noop' but allow 'none' in | ||
| // the ctx map |
There was a problem hiding this comment.
Not sure what this is about, but since I'm just renaming the class, keeping the comment as it is retains semantic meaning to whatever it was before
|
Pinging @elastic/es-distributed (Team:Distributed) |
Renames
AbstractAsyncBulkByScrollActiontoAbstractAsyncBulkByPaginatedSearchActionnow that scroll based search has been replaced by point-in-time search for reindexing. This is point 5 of https://github.com/elastic/elasticsearch-team/issues/2406.Relates: https://github.com/elastic/elasticsearch-team/issues/2406