Skip to content

Rename AbstractAsyncBulkByScrollAction to AbstractAsyncBulkByPaginatedSearchAction#149408

Open
joshua-adams-1 wants to merge 2 commits into
mainfrom
reindexing-rename-abstract-async-bulk-by-scroll-action
Open

Rename AbstractAsyncBulkByScrollAction to AbstractAsyncBulkByPaginatedSearchAction#149408
joshua-adams-1 wants to merge 2 commits into
mainfrom
reindexing-rename-abstract-async-bulk-by-scroll-action

Conversation

@joshua-adams-1
Copy link
Copy Markdown
Contributor

Renames AbstractAsyncBulkByScrollAction to AbstractAsyncBulkByPaginatedSearchAction now 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

…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
@joshua-adams-1 joshua-adams-1 requested a review from Copilot May 19, 2026 14:53
@joshua-adams-1 joshua-adams-1 self-assigned this May 19, 2026
@joshua-adams-1 joshua-adams-1 added >non-issue :Distributed/Reindex Issues relating to reindex that are not caused by issues further down labels May 19, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 inner DummyAsyncBulkByScrollAction) now primarily exercise AbstractAsyncBulkByPaginatedSearchAction, 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 AbstractAsyncBulkByPaginatedSearchAction and 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.

Comment on lines +24 to 25
// AbstractAsyncBulkByPaginatedSearchAction.OpType uses 'noop' rather than 'none', so unify on 'noop' but allow 'none' in
// the ctx map
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@joshua-adams-1 joshua-adams-1 requested a review from szybia May 19, 2026 16:17
@joshua-adams-1 joshua-adams-1 marked this pull request as ready for review May 19, 2026 16:17
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Meta label for distributed team. label May 19, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

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

Labels

:Distributed/Reindex Issues relating to reindex that are not caused by issues further down >non-issue Team:Distributed Meta label for distributed team. v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants