-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Bug Fix: System Data Streams Should Be Restorable #124651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Fix: System Data Streams Should Be Restorable #124651
Conversation
Hi @JVerwolf, I've created a changelog YAML for you. |
…JVerwolf/elasticsearch into bugfix/datastreams-should-be-restorable
…atastreams-should-be-restorable
server/src/internalClusterTest/java/org/elasticsearch/snapshots/SystemIndicesSnapshotIT.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor initial comments. I suggest someone from data management review.
server/src/main/java/org/elasticsearch/cluster/metadata/MetadataDeleteDataStreamService.java
Outdated
Show resolved
Hide resolved
…JVerwolf/elasticsearch into bugfix/datastreams-should-be-restorable
server/src/internalClusterTest/java/org/elasticsearch/snapshots/SystemIndicesSnapshotIT.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a couple of comments from the Data Management side, but nothing major. I agree with Ryan about trying to combine with MetadataDataStreamsService
instead of adding a new service if possible.
server/src/internalClusterTest/java/org/elasticsearch/snapshots/SystemIndicesSnapshotIT.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/metadata/MetadataDeleteDataStreamService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/metadata/MetadataDeleteDataStreamService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/metadata/MetadataDataStreamsService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/snapshots/RestoreService.java
Outdated
Show resolved
Hide resolved
// first delete the data streams and then the indices: | ||
// (this to avoid data stream validation from failing when deleting an index that is part of a data stream | ||
// without updating the data stream) | ||
// TODO: change order when "delete index api" also updates the data stream the "index to be removed" is a member of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this TODO entirely, why would we want to change the order when invoked by the delete index API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me neither, but it was already there in the transport action so I kept it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot for the iterations, @JVerwolf!
💔 Backport failed
You can use sqren/backport to manually backport by running |
This PR adds a new MetadataDeleteDataStreamService that allows us to delete system data streams prior to a restore operation. This fixes a bug where system data streams were previously un-restorable. (cherry picked from commit cb3c357) # Conflicts: # modules/data-streams/src/main/java/org/elasticsearch/datastreams/action/DeleteDataStreamTransportAction.java # server/src/main/java/org/elasticsearch/snapshots/RestoreService.java # server/src/test/java/org/elasticsearch/cluster/metadata/MetadataDataStreamsServiceTests.java
💔 Some backports could not be created
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
This PR adds a new MetadataDeleteDataStreamService that allows us to delete system data streams prior to a restore operation. This fixes a bug where system data streams were previously un-restorable. (cherry picked from commit cb3c357) # Conflicts: # modules/data-streams/src/main/java/org/elasticsearch/datastreams/action/DeleteDataStreamTransportAction.java # server/src/main/java/org/elasticsearch/snapshots/RestoreService.java # server/src/test/java/org/elasticsearch/cluster/metadata/MetadataDataStreamsServiceTests.java
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
This PR adds a new MetadataDeleteDataStreamService that allows us to delete system data streams prior to a restore operation. This fixes a bug where system data streams were previously un-restorable. (cherry picked from commit cb3c357) # Conflicts: # modules/data-streams/src/main/java/org/elasticsearch/datastreams/action/DeleteDataStreamTransportAction.java # server/src/main/java/org/elasticsearch/snapshots/RestoreService.java # server/src/test/java/org/elasticsearch/cluster/metadata/MetadataDataStreamsServiceTests.java
Curiously, the v8 backports are all failing the |
…24910) * Bug Fix: System Data Streams Should Be Restorable (#124651) This PR adds a new MetadataDeleteDataStreamService that allows us to delete system data streams prior to a restore operation. This fixes a bug where system data streams were previously un-restorable. (cherry picked from commit cb3c357) # Conflicts: # modules/data-streams/src/main/java/org/elasticsearch/datastreams/action/DeleteDataStreamTransportAction.java # server/src/main/java/org/elasticsearch/snapshots/RestoreService.java # server/src/test/java/org/elasticsearch/cluster/metadata/MetadataDataStreamsServiceTests.java * Fix test bug, mute test * [CI] Auto commit changes from spotless --------- Co-authored-by: elasticsearchmachine <[email protected]>
…124912) * Bug Fix: System Data Streams Should Be Restorable (#124651) This PR adds a new MetadataDeleteDataStreamService that allows us to delete system data streams prior to a restore operation. This fixes a bug where system data streams were previously un-restorable. (cherry picked from commit cb3c357) # Conflicts: # modules/data-streams/src/main/java/org/elasticsearch/datastreams/action/DeleteDataStreamTransportAction.java # server/src/main/java/org/elasticsearch/snapshots/RestoreService.java # server/src/test/java/org/elasticsearch/cluster/metadata/MetadataDataStreamsServiceTests.java * Fix test bug, mute test
…24900) * Bug Fix: System Data Streams Should Be Restorable (#124651) This PR adds a new MetadataDeleteDataStreamService that allows us to delete system data streams prior to a restore operation. This fixes a bug where system data streams were previously un-restorable. (cherry picked from commit cb3c357) # Conflicts: # modules/data-streams/src/main/java/org/elasticsearch/datastreams/action/DeleteDataStreamTransportAction.java # server/src/main/java/org/elasticsearch/snapshots/RestoreService.java # server/src/test/java/org/elasticsearch/cluster/metadata/MetadataDataStreamsServiceTests.java * Fix test bug * mute test
This PR deletes system data streams prior to a
restore
operation. To enable this, I refactored the way that datastreams are deleted to allow for a single metadata update operation that both deletes existing system datastreams and then restores them as part of a single operation.closes #89261