Skip to content

Cancel reindex body always has status#142766

Merged
szybia merged 3 commits intoelastic:mainfrom
szybia:fix-reindex-cancel
Feb 23, 2026
Merged

Cancel reindex body always has status#142766
szybia merged 3 commits intoelastic:mainfrom
szybia:fix-reindex-cancel

Conversation

@szybia
Copy link
Copy Markdown
Contributor

@szybia szybia commented Feb 20, 2026

  • There seems to be a race where by the time we cancel the task with wait_for_completion=true, the status isn't yet set, leading to failure asserting status.cancelled in yaml rest tests
  • So let's cancel the task asynchronously, and wait for it's completion (local node operation so no hops) and get the normal full and completedGET _reindex response
    • This was originally the approach i was going to go with, but seemed simpler to do the current approach, but knowing this, sways my thinking towards this

Closes #142079

@szybia szybia changed the title Cancel reindex always has status Cancel reindex body always has status Feb 20, 2026
@szybia szybia added >non-issue :Distributed/Reindex Issues relating to reindex that are not caused by issues further down labels Feb 23, 2026
@szybia szybia marked this pull request as ready for review February 23, 2026 11:42
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Meta label for distributed team. label Feb 23, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Contributor

@samxbr samxbr left a comment

Choose a reason for hiding this comment

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

Change LGTM! Have you tried running the tests in iterations to verify?

@szybia
Copy link
Copy Markdown
Contributor Author

szybia commented Feb 23, 2026

yup! ran with 500+ iterations and looks good, ty!

@szybia szybia merged commit dc38e87 into elastic:main Feb 23, 2026
35 checks passed
@szybia szybia deleted the fix-reindex-cancel branch February 23, 2026 18:51
szybia added a commit to szybia/elasticsearch that referenced this pull request Feb 23, 2026
…on-sliced-reindex

* upstream/main: (110 commits)
  Add search task watchdog to log hot threads on slow search (elastic#142746)
  Fix return_intermediate_results query param on get async search results (elastic#142875)
  Mute org.elasticsearch.compute.operator.exchange.BatchDriverTests testSinglePageSingleBatch elastic#142895
  Cancel reindex body always has status (elastic#142766)
  Fix built-in roles sync losing updates (elastic#142433)
  ESQL: Clarify docs and add csv test for WHERE in STATS (elastic#133629)
  Fix and unmute ReindexResumeIT (elastic#142788)
  Fix broken release notes
  Mute org.elasticsearch.benchmark.vector.scorer.VectorScorerOSQBenchmarkTests testSingleScalarVsVectorized {p0=384 p1=4 p2=NIO p3=COSINE} elastic#142883
  ES|QL: fix Generative tests for commands that don't change the output schema (elastic#142864)
  Mute org.elasticsearch.benchmark.vector.scorer.VectorScorerOSQBenchmarkTests testSingleScalarVsVectorized {p0=1024 p1=1 p2=NIO p3=DOT_PRODUCT} elastic#142881
  SQL: Fix QlIllegalArgumentException with non-foldable date range queries (elastic#142386)
  Add more errors to the allowed_errors with github issue links (elastic#142862)
  ESQL: reapply "NDJSON datasource" (elastic#142855)
  Add implementation to update service settings method for Alibaba Cloud Search service (elastic#142738)
  Mute org.elasticsearch.snapshots.SnapshotShutdownIT testStartRemoveNodeButDoNotComplete elastic#142871
  Mute org.elasticsearch.snapshots.SnapshotShutdownIT testDeleteSnapshotWithPausedShardSnapshots elastic#142870
  Mute org.elasticsearch.snapshots.SnapshotShutdownIT testAbortSnapshotWhileRemovingNode elastic#142869
  Mute org.elasticsearch.snapshots.SnapshotShutdownIT testRemoveNodeDuringSnapshot elastic#142868
  ES|QL: Guard exponential_histogram TO_STRING against too large inputs (elastic#140718)
  ...
jdconrad pushed a commit to jdconrad/elasticsearch that referenced this pull request Feb 24, 2026
sidosera pushed a commit to sidosera/elasticsearch that referenced this pull request Feb 24, 2026
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.4.0

Projects

None yet

3 participants