This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Fixes snapshot issues, adds history mapping update workflow, adds tests #255
Merged
dbbaughe
merged 4 commits into
opendistro-for-elasticsearch:master
from
dbbaughe:snapshot-fixes
Jul 17, 2020
Merged
Fixes snapshot issues, adds history mapping update workflow, adds tests #255
dbbaughe
merged 4 commits into
opendistro-for-elasticsearch:master
from
dbbaughe:snapshot-fixes
Jul 17, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #255 +/- ##
============================================
+ Coverage 71.31% 71.38% +0.07%
- Complexity 633 635 +2
============================================
Files 86 86
Lines 3646 3690 +44
Branches 603 610 +7
============================================
+ Hits 2600 2634 +34
- Misses 732 737 +5
- Partials 314 319 +5
Continue to review full report at Codecov.
|
Has some snapshot tests that need to be tested with unit tests, still tracking in this. |
qreshi
reviewed
Jul 16, 2020
src/main/kotlin/com/amazon/opendistroforelasticsearch/indexstatemanagement/util/IndexUtils.kt
Outdated
Show resolved
Hide resolved
qreshi
approved these changes
Jul 16, 2020
zengyan-amazon
approved these changes
Jul 17, 2020
dbbaughe
added a commit
to dbbaughe/index-management
that referenced
this pull request
Jul 29, 2020
…ts (opendistro-for-elasticsearch#255) * Fixes snapshot issues, adds history mapping update workflow, adds tests * Adds a couple more tests for the destination parsing tests * Removes unneeded line
dbbaughe
added a commit
to dbbaughe/index-management
that referenced
this pull request
Jul 29, 2020
…ts (opendistro-for-elasticsearch#255) * Fixes snapshot issues, adds history mapping update workflow, adds tests * Adds a couple more tests for the destination parsing tests * Removes unneeded line
dbbaughe
added a commit
that referenced
this pull request
Jul 29, 2020
* Fixes snapshot bugs (#244) * Simplifies snapshot message * Handle ConcurrentSnapshotExecutionExceptions during remote transport calls * Adds try/catch block around WaitForSnapshotStep execute * Fixes snapshot completed check including failed/aborted and makes status check exhaustive * Adds snapshot name to ActionProperties * Uses snapshotName in ActionProperties in snapshot steps * Adds a couple more integration tests for snapshot action * Suppress complex method in execute step * Fixes snapshot issues, adds history mapping update workflow, adds tests (#255) * Fixes snapshot issues, adds history mapping update workflow, adds tests * Adds a couple more tests for the destination parsing tests * Removes unneeded line
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
This PR addresses a few different issues/fixes.
For starters the snapshot_name in ActionProperties was missing from the history index mappings.
This was causing indexing of history documents for the snapshot action to fail to be indexed as the index has strict mappings.
By adding these new mappings it was apparent we did not have a way for the history index to update it's mappings if needed.
This was added following the similar workflow for the config index by adding a schema_version and checking the existing index schema_version with the one from the loaded plugin to see if it needs to update.
To ensure this doesn't happen again for the ActionProperties a test has been added that verifies all properties in ActionProperties exists in the action_properties mapping in the history mappings.
The initiation of the history index did not do anything with the boolean return result which means it would silently fail and then attempt to index the history documents anyways. This could lead to dynamic mappings for the index. As of now this has been changed to log an error and return early as our indexing of history documents is best effort. We should look into making this error available for a monitoring system to alert on.
Fixes issues in the WaitForSnapshotStep that that was causing writes to fail to the history index and catching RemoteTransportExceptions for the multi-node clusters.
Added some tests to catch when the mappings update for the indices. If the mappings update then it means the person who updated them must increase the schema_version otherwise at runtime the plugin will not know it needs to update the index mappings. Before this was just done through code reviews, but now it will fail a test if the mappings change. It's on the user to then update the cached mappings and make sure they correctly increased the schema_version. An added security to make sure it's not missed.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.