Skip to content

Conversation

@original-brownbear
Copy link
Contributor

@original-brownbear original-brownbear commented Jun 25, 2019

  • There is no point (and some harm) in deleting the snap- blob before writing the updated index-N blob in the shard folder:
    • We will delete it in finalizeShard anyway where we list the shard folders contents and clean them up (in a bulk delete) so we're just wasting an RPC call here
    • Deleting it before writing the updated index-N blob actually could leave a broken index-(N-1) blob if writing index-N fails and index-(N-1) still references the now deleted snap- blob

* There is no point (and some harm) in deleting the snap- blob before writing the updated index-N blob in the shard folder:
   * We will delete it in `finalizeShard` anyway where we list the shard folders contents and clean them up
   * Deleting it before writing the updated index-N blob actually could leave a broken index-(N-1) blob if writing index-N fails and index-(N-1) still references the now deleted snap- blob
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@original-brownbear
Copy link
Contributor Author

My bad, we don't yet clean up snap- in the shard directories automatically ... I'll revisit this once #43542 has landed since the code from that can be reused.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants