You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix race condition in Feature Migration Status API (#80572)
Prior to this commit, there is a race condition in the Feature Migration
Status API where the returned status can be `MIGRATION_NEEDED`, even if
a migration is already in progress (and therefore the returned value
should have been `IN_PROGRESS`). This commit adds a test for this case
which reliably fails without the fix, and fixes the bug.
The fix is straightforward: While we already examine the persistent task
metadata to determine progress, the part of that metadata that we
examined did was not updated until the task's been running for a bit.
However, if we check for the *existence* of the task metadata, that is
guaranteed to be in the cluster state by the time the request to start the
migration completes (and is removed immediately after the task finishes
- that's why we have separate metadata for the migration results instead
of just using the task state).
Copy file name to clipboardExpand all lines: server/src/main/java/org/elasticsearch/action/admin/cluster/migration/TransportGetFeatureUpgradeStatusAction.java
0 commit comments