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

Always include the matching node when resolving point in time #61658

Merged
merged 6 commits into from
Sep 1, 2020
Merged
Changes from 1 commit
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 @@ -8,6 +8,7 @@

import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.action.admin.indices.stats.CommonStats;
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin;
import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction;
Expand Down Expand Up @@ -62,6 +63,15 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
return plugins;
}

@Override
public Settings indexSettings() {
return Settings.builder()
.put(super.indexSettings())
// If shards are relocated to new nodes, then searches with point-in-time will fail
.put(EnableAllocationDecider.INDEX_ROUTING_REBALANCE_ENABLE_SETTING.getKey(), "none")
.build();
}

public void testBasic() {
createIndex("test");
int numDocs = randomIntBetween(10, 50);
Expand Down