Skip to content

Fix getSnapshotIndexMetaData Exception Behavior#47488

Merged
original-brownbear merged 1 commit intoelastic:masterfrom
original-brownbear:fix-slm-test
Oct 3, 2019
Merged

Fix getSnapshotIndexMetaData Exception Behavior#47488
original-brownbear merged 1 commit intoelastic:masterfrom
original-brownbear:fix-slm-test

Conversation

@original-brownbear
Copy link
Copy Markdown
Contributor

@original-brownbear original-brownbear commented Oct 3, 2019

If we fail to read the global metadata in a snapshot
we would throw SnapshotMissingException but wouldn't
do so for the index metadata.
This is breaking SLM tests at a low rate because they
use SnapshotMissingException thrown from snapshot status APIs
to wait for a snapshot being gone and if a concurrent (to the status API call)
delete hits that could lead to reading the snapshot from the RepositoryData
but then when trying to get the index metadata failing.
Also, we should be consistent here in general and not leak the
NoSuchFileException to the transport layer for index meta.

Closes #46508

If we fail to read the global metadata in a snapshot
we would throw `SnapshotMissingException` but wouldn't
do so for the index metadata.
This is breaking SLM tests at a low rate because they
use `SnapshotMissingException` thrown from snapshot status APIs
to wait for a snapshot being gone.
Also, we should be consistent here in general and not leak the
`NoSuchFileException` to the transport layer for index meta.

Closes #46508
@original-brownbear original-brownbear added >non-issue :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.0.0 v7.5.0 labels Oct 3, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore)

Copy link
Copy Markdown
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM

@original-brownbear
Copy link
Copy Markdown
Contributor Author

Thanks @ywelsch & @tlrx :)

@original-brownbear original-brownbear merged commit c74ca28 into elastic:master Oct 3, 2019
@original-brownbear original-brownbear deleted the fix-slm-test branch October 3, 2019 09:00
original-brownbear added a commit that referenced this pull request Oct 3, 2019
If we fail to read the global metadata in a snapshot
we would throw `SnapshotMissingException` but wouldn't
do so for the index metadata.
This is breaking SLM tests at a low rate because they
use `SnapshotMissingException` thrown from snapshot status APIs
to wait for a snapshot being gone.
Also, we should be consistent here in general and not leak the
`NoSuchFileException` to the transport layer for index meta.

Closes #46508
@original-brownbear original-brownbear restored the fix-slm-test branch August 6, 2020 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >non-issue v7.5.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] SLMSnapshotBlockingIntegTests.testRetentionWhileSnapshotInProgress failure on master

5 participants