Skip to content

Conversation

@original-brownbear
Copy link
Contributor

  • The problem here is that if we run into a corrupted index-N file, instead of generating a new index-(N+1) file, we instead set the newest index generation to -1 and thus tried to create index-0
    • If index-0 is corrupt, this prevents us from ever creating a new snapshot using the broken shard, because we are unable to create index-0 since it already exists
    • Fixed by still using the index generation for naming the next index file, even if it was a broken index file
  • Added test that makes sure restoring as well as snapshotting on top of the broken shard index file work as expected
  • closes Repository with Broken Shards' index-N File Can't Create New Snapshots #41304

backport of #41310

…astic#41310)

* The problem here is that if we run into a corrupted index-N file, instead of generating a new index-(N+1) file, we instead set the newest index generation to -1 and thus tried to create `index-0`
   * If `index-0` is corrupt, this prevents us from ever creating a new snapshot using the broken shard, because we are unable to create `index-0` since it already exists
   * Fixed by still using the index generation for naming the next index file, even if it was a broken index file
* Added test that makes sure restoring as well as snapshotting on top of the broken shard index file work as expected
* closes elastic#41304
@original-brownbear original-brownbear added >bug :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs backport labels Apr 24, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

12 similar comments
@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1

@original-brownbear original-brownbear merged commit 21c3053 into elastic:6.7 Apr 25, 2019
@original-brownbear original-brownbear deleted the 41310-6.7 branch April 25, 2019 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport >bug :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants