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

Deprecate http.pipelining setting #30786

Merged
merged 5 commits into from
May 23, 2018
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -49,8 +49,9 @@ public final class HttpTransportSettings {
new Setting<>("http.cors.allow-headers", "X-Requested-With,Content-Type,Content-Length", (value) -> value, Property.NodeScope);
public static final Setting<Boolean> SETTING_CORS_ALLOW_CREDENTIALS =
Setting.boolSetting("http.cors.allow-credentials", false, Property.NodeScope);
// In 7.0 pipelining support will always be enabled and this setting will be removed.
public static final Setting<Boolean> SETTING_PIPELINING =
Setting.boolSetting("http.pipelining", true, Property.NodeScope);
Setting.boolSetting("http.pipelining", true, Property.NodeScope, Property.Deprecated);
public static final Setting<Integer> SETTING_PIPELINING_MAX_EVENTS =
Setting.intSetting("http.pipelining.max_events", 10000, Property.NodeScope);
public static final Setting<Boolean> SETTING_HTTP_COMPRESSION =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.common.util.MockBigArrays;
import org.elasticsearch.env.Environment;
import org.elasticsearch.http.HttpTransportSettings;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.search.MockSearchService;
import org.elasticsearch.search.SearchService;
Expand Down Expand Up @@ -69,6 +70,6 @@ public void testComponentsMockedByMarkerPlugins() throws IOException {
assertSame(searchService.getClass(), SearchService.class);
}
}
assertSettingDeprecationsAndWarnings(new Setting<?>[] { NetworkModule.HTTP_ENABLED });
assertSettingDeprecationsAndWarnings(new Setting<?>[] { NetworkModule.HTTP_ENABLED, HttpTransportSettings.SETTING_PIPELINING});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.elasticsearch.discovery.DiscoverySettings;
import org.elasticsearch.discovery.zen.ZenDiscovery;
import org.elasticsearch.env.NodeEnvironment;
import org.elasticsearch.http.HttpTransportSettings;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.InternalTestCluster;
Expand Down Expand Up @@ -72,6 +73,8 @@
@LuceneTestCase.SuppressFileSystems("ExtrasFS") // doesn't work with potential multi data path from test cluster yet
public class InternalTestClusterTests extends ESTestCase {

private static final Setting<?>[] DEPRECATED_SETTINGS = {NetworkModule.HTTP_ENABLED, HttpTransportSettings.SETTING_PIPELINING};

public void testInitializiationIsConsistent() {
long clusterSeed = randomLong();
boolean masterNodes = randomBoolean();
Expand Down Expand Up @@ -233,7 +236,7 @@ public Settings transportClientSettings() {
assertArrayEquals(cluster0.getNodeNames(), cluster1.getNodeNames());
if (cluster0.getNodeNames().length > 0) {
shouldAssertSettingsDeprecationsAndWarnings = true;
assertSettingDeprecationsAndWarnings(new Setting<?>[]{NetworkModule.HTTP_ENABLED});
assertSettingDeprecationsAndWarnings(DEPRECATED_SETTINGS);
}
Iterator<Client> iterator1 = cluster1.getClients().iterator();
for (Client client : cluster0.getClients()) {
Expand All @@ -248,7 +251,7 @@ public Settings transportClientSettings() {
} finally {
IOUtils.close(cluster0, cluster1);
if (shouldAssertSettingsDeprecationsAndWarnings) {
assertSettingDeprecationsAndWarnings(new Setting<?>[]{NetworkModule.HTTP_ENABLED});
assertSettingDeprecationsAndWarnings(DEPRECATED_SETTINGS);
}
}
}
Expand Down Expand Up @@ -355,7 +358,7 @@ public Settings transportClientSettings() {
} finally {
cluster.close();
}
assertSettingDeprecationsAndWarnings(new Setting<?>[] { NetworkModule.HTTP_ENABLED });
assertSettingDeprecationsAndWarnings(DEPRECATED_SETTINGS);
}

private Path[] getNodePaths(InternalTestCluster cluster, String name) {
Expand Down Expand Up @@ -456,7 +459,7 @@ public Settings transportClientSettings() {
} finally {
cluster.close();
}
assertSettingDeprecationsAndWarnings(new Setting<?>[] { NetworkModule.HTTP_ENABLED });
assertSettingDeprecationsAndWarnings(DEPRECATED_SETTINGS);
}

public void testTwoNodeCluster() throws Exception {
Expand Down Expand Up @@ -516,6 +519,6 @@ public Settings onNodeStopped(String nodeName) throws Exception {
} finally {
cluster.close();
}
assertSettingDeprecationsAndWarnings(new Setting<?>[] { NetworkModule.HTTP_ENABLED });
assertSettingDeprecationsAndWarnings(DEPRECATED_SETTINGS);
}
}