Skip to content

Commit

Permalink
fix ccr
Browse files Browse the repository at this point in the history
  • Loading branch information
original-brownbear committed Jun 14, 2021
1 parent d875e8c commit 94f44ed
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,16 +185,17 @@ public void getSnapshotInfo(GetSnapshotInfoContext context) {
ArrayList<String> indices = new ArrayList<>(indicesMap.size());
indicesMap.keysIt().forEachRemaining(indices::add);

context.onResponse(
new SnapshotInfo(
SNAPSHOT_ID,
indices,
new ArrayList<>(metadata.dataStreams().keySet()),
Collections.emptyList(),
response.getState().getNodes().getMaxNodeVersion(),
SnapshotState.SUCCESS
)
);
// fork to the snapshot meta pool because the context expects to run on it and asserts that it does
threadPool.executor(ThreadPool.Names.SNAPSHOT_META).execute(() -> context.onResponse(
new SnapshotInfo(
SNAPSHOT_ID,
indices,
new ArrayList<>(metadata.dataStreams().keySet()),
Collections.emptyList(),
response.getState().getNodes().getMaxNodeVersion(),
SnapshotState.SUCCESS
)
));
}

@Override
Expand Down

0 comments on commit 94f44ed

Please sign in to comment.