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

[Segment Replication] Modify shrink exception to be more informative #12117

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public void testCreateShrinkIndexThrowsExceptionWhenReplicasBehind() throws Exce
.get()
);
assertEquals(
" For index [test] replica shards haven't caught up with primary, please retry after sometime.",
"Replication still in progress for index [test]. Please wait for replication to complete and retry. "
+ "Use the _cat/segment_replication/test api to check if the index is up to date (e.g. bytes_behind == 0).",
exception.getMessage()
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,11 @@ protected void clusterManagerOperation(
.getSegments()
.getReplicationStats().maxBytesBehind != 0) {
throw new IllegalStateException(
" For index ["
"Replication still in progress for index ["
+ sourceIndex
+ "] replica shards haven't caught up with primary, please retry after sometime."
+ "]. Please wait for replication to complete and retry. Use the _cat/segment_replication/"
+ sourceIndex
+ " api to check if the index is up to date (e.g. bytes_behind == 0)."
);
}

Expand Down
Loading