Skip to content

Commit 94f44ed

Browse files
fix ccr
1 parent d875e8c commit 94f44ed

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/repository/CcrRepository.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,17 @@ public void getSnapshotInfo(GetSnapshotInfoContext context) {
185185
ArrayList<String> indices = new ArrayList<>(indicesMap.size());
186186
indicesMap.keysIt().forEachRemaining(indices::add);
187187

188-
context.onResponse(
189-
new SnapshotInfo(
190-
SNAPSHOT_ID,
191-
indices,
192-
new ArrayList<>(metadata.dataStreams().keySet()),
193-
Collections.emptyList(),
194-
response.getState().getNodes().getMaxNodeVersion(),
195-
SnapshotState.SUCCESS
196-
)
197-
);
188+
// fork to the snapshot meta pool because the context expects to run on it and asserts that it does
189+
threadPool.executor(ThreadPool.Names.SNAPSHOT_META).execute(() -> context.onResponse(
190+
new SnapshotInfo(
191+
SNAPSHOT_ID,
192+
indices,
193+
new ArrayList<>(metadata.dataStreams().keySet()),
194+
Collections.emptyList(),
195+
response.getState().getNodes().getMaxNodeVersion(),
196+
SnapshotState.SUCCESS
197+
)
198+
));
198199
}
199200

200201
@Override

0 commit comments

Comments
 (0)