Skip to content
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

ILM: add searchable snapshot action #52585

Merged
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
25cea2b
ILM: add searchable snapshot action
andreidan Feb 19, 2020
3c32490
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Feb 21, 2020
7dbc46e
Add license header
andreidan Feb 21, 2020
9881c44
Document why we don’t restore the lifecycle setting
andreidan Feb 21, 2020
a601dbf
Checkstyle
andreidan Feb 21, 2020
f0a9da1
Remove unused import
andreidan Feb 21, 2020
dfec7c9
Use WaitForIndexColorStep
andreidan Feb 24, 2020
a6bc720
Use requireNonNull
andreidan Feb 24, 2020
271fb54
Refactorings and cleanups
andreidan Feb 25, 2020
f6f7d29
Make performAction final in AsyncRetryDuringSnapshotActionStep
andreidan Feb 25, 2020
7075752
Add docs and redesign OnAsyncWaitBranchingStep
andreidan Feb 26, 2020
501dbaf
Rename BranchingStepListener onStopWaitingForCondition
andreidan Feb 27, 2020
1222902
Extract and reuse the alias swap request
andreidan Feb 28, 2020
faa2834
Rename restoredIndexPrefix to targetIndexPrefix
andreidan Mar 2, 2020
21d67cb
Fix tests
andreidan Mar 2, 2020
7e0d5f7
Unused imports
andreidan Mar 2, 2020
eafe3de
Handle null next step key
andreidan Mar 2, 2020
bc91ae3
Try with resources in test
andreidan Mar 2, 2020
8520c7b
Rename originalIndex to sourceIndexName
andreidan Mar 2, 2020
9735649
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 2, 2020
d20cf52
More tests
andreidan Mar 2, 2020
8a46d05
Add more steps tests
andreidan Mar 3, 2020
12c1f5f
Make method static
andreidan Mar 3, 2020
3870388
Don’t fail if the response isAck flag is false
andreidan Mar 3, 2020
d28557c
Searchable action tests and more step tests
andreidan Mar 4, 2020
357987b
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 4, 2020
6960187
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 5, 2020
9af943f
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 6, 2020
858e6a1
Store the snapshot name in the ILM execution state
andreidan Mar 6, 2020
6edfcd0
Remove import
andreidan Mar 6, 2020
e4791b0
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 6, 2020
63194ea
Copy the repository and snapshot name
andreidan Mar 10, 2020
a92463f
Expose repo and snapshot name in the ILM explain response
andreidan Mar 10, 2020
0f65ed7
Explain lifecycle repo and snapshot in transport
andreidan Mar 10, 2020
6e779b6
Delete action has an optional parameter delege_generated_snapshot
andreidan Mar 10, 2020
841f6bc
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 10, 2020
da361b5
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
andreidan Mar 11, 2020
5eb524e
Drop the searchable repository action param
andreidan Mar 11, 2020
8e8ff99
Drop sys.out.println
andreidan Mar 11, 2020
119c439
Fix docs tests
andreidan Mar 11, 2020
064b4e7
BWC for DeleteAction delete generated snap flag
andreidan Mar 11, 2020
1cb6480
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 11, 2020
3a750e0
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 12, 2020
0a79753
Update settings version when copying settings
andreidan Mar 12, 2020
013d4df
Add test that deletes the snapshot
andreidan Mar 12, 2020
aa098d2
Document step
andreidan Mar 12, 2020
520d6bb
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 12, 2020
5e4cf55
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
andreidan Mar 24, 2020
32e3371
Format code
andreidan Mar 24, 2020
ac9e9c3
Make CleanupSnapshotStep retryable
andreidan Mar 24, 2020
b68b61c
Fix typo
andreidan Mar 24, 2020
374e50d
Format code
andreidan Mar 25, 2020
4f25ce9
CreateSnapshotStep request specifies index name
andreidan Mar 24, 2020
0f6f371
Rename delete action field to delete_searchable_snapshot
andreidan Mar 25, 2020
15d39ed
Rename SSA repo field to snapshot_repository (underscore)
andreidan Mar 25, 2020
e76ff6c
Fix delete action test assertions
andreidan Mar 25, 2020
ff7623f
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 25, 2020
3c56f73
Fix doc tests
andreidan Mar 25, 2020
06bf054
Change debug level to warn
andreidan Mar 25, 2020
c3d785e
Log when we stop waiting for the branch condition
andreidan Mar 25, 2020
9d37f78
MountSnapshotStep is retries when response is not acked
andreidan Mar 25, 2020
985477e
Doc null handling
andreidan Mar 25, 2020
2e4bd2b
Update info message to be good english
andreidan Mar 25, 2020
cd73bd6
Use the correct Info class Luke
andreidan Mar 25, 2020
0ca1db0
Cleanup if/else branches that check the snapshot state
andreidan Mar 25, 2020
2b467cf
Log that the swap aliases response was not acked
andreidan Mar 25, 2020
5f506ee
SnapshotInProgress null check
andreidan Mar 25, 2020
80c9a45
Fix test
andreidan Mar 25, 2020
8ed70c8
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 26, 2020
c38e081
Delete phase min_age after 5 seconds
andreidan Mar 26, 2020
c032d3a
Checkstyle
andreidan Mar 26, 2020
7107b1a
Use underscore in action name too
andreidan Mar 26, 2020
5bc6df2
Get the generated snapshot name from the original index in test
andreidan Mar 27, 2020
5b7f599
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 27, 2020
7f1940d
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 27, 2020
879e7d6
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 27, 2020
01222af
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 30, 2020
64a903d
Update exception message
andreidan Mar 30, 2020
6e4ede4
Update javadoc
andreidan Mar 30, 2020
864f4c3
Add example of generated snapshot name
andreidan Mar 30, 2020
9bbb9df
Fail CleanupSnapshotStep if the request is not acked
andreidan Mar 30, 2020
2c61f00
Move empty settings check before target index check
andreidan Mar 30, 2020
ac574b2
Delete WaitForSnapshotInProgressStepTests
andreidan Mar 31, 2020
567d067
Merge branch 'feature/searchable-snapshots' into ilm-searchable-snaps…
elasticmachine Mar 31, 2020
b766806
Fix typo
andreidan Mar 31, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move empty settings check before target index check
  • Loading branch information
andreidan committed Mar 30, 2020
commit 2c61f0063170ca84ffe1db811a49fa00fd7be9fc
Original file line number Diff line number Diff line change
@@ -65,17 +65,17 @@ public ClusterState performAction(Index index, ClusterState clusterState) {
return clusterState;
}

if (settingsKeys == null || settingsKeys.length == 0) {
return clusterState;
}

if (targetIndexMetadata == null) {
String errorMessage = String.format(Locale.ROOT, "index [%s] is being referenced by ILM action [%s] on step [%s] but " +
"it doesn't exist", targetIndexName, getKey().getAction(), getKey().getName());
logger.debug(errorMessage);
throw new IllegalStateException(errorMessage);
}

if (settingsKeys == null || settingsKeys.length == 0) {
return clusterState;
}

Settings.Builder settings = Settings.builder().put(targetIndexMetadata.getSettings());
for (String key : settingsKeys) {
String value = sourceIndexMetadata.getSettings().get(key);