Skip to content

Commit

Permalink
[Transform] Do not use PIT in the presence of remote indices in source
Browse files Browse the repository at this point in the history
  • Loading branch information
przemekwitek committed Sep 22, 2023
1 parent 2df6def commit c18b6d0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected void doNextSearch(long waitTimeInNanos, ActionListener<SearchResponse>

injectPointInTimeIfNeeded(
buildSearchRequest(),
ActionListener.wrap(pitSearchRequest -> doSearch(pitSearchRequest, nextPhase), nextPhase::onFailure)
ActionListener.wrap(searchRequest -> doSearch(searchRequest, nextPhase), nextPhase::onFailure)
);
}

Expand Down Expand Up @@ -435,7 +435,8 @@ private void injectPointInTimeIfNeeded(
ActionListener<Tuple<String, SearchRequest>> listener
) {
SearchRequest searchRequest = namedSearchRequest.v2();
if (disablePit || searchRequest.indices().length == 0) {
// We explicitly disable PIT in the presence of remote clusters in the source due to huge PIT handles causing performance problems.
if (disablePit || searchRequest.indices().length == 0 || transformConfig.getSource().requiresRemoteCluster()) {
listener.onResponse(namedSearchRequest);
return;
}
Expand Down

0 comments on commit c18b6d0

Please sign in to comment.