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

Remove defunct query.remote-task.min-error-duration configuration #17722

Merged
Show file tree
Hide file tree
Changes from all 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 @@ -46,7 +46,9 @@
"query-manager.initialization-timeout",
"fault-tolerant-execution-target-task-split-count",
"fault-tolerant-execution-target-task-input-size",
"query.remote-task.max-consecutive-error-count"})
"query.remote-task.max-consecutive-error-count",
"query.remote-task.min-error-duration",
})
public class QueryManagerConfig
{
public static final long AVAILABLE_HEAP_MEMORY = Runtime.getRuntime().maxMemory();
Expand Down Expand Up @@ -376,19 +378,6 @@ public QueryManagerConfig setMaxStateMachineCallbackThreads(int maxStateMachineC
return this;
}

@Deprecated
public Duration getRemoteTaskMinErrorDuration()
{
return remoteTaskMaxErrorDuration;
}

@Deprecated
@Config("query.remote-task.min-error-duration")
public QueryManagerConfig setRemoteTaskMinErrorDuration(Duration remoteTaskMinErrorDuration)
{
return this;
}

@NotNull
@MinDuration("1s")
public Duration getRemoteTaskMaxErrorDuration()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package io.trino.operator;

import io.airlift.configuration.Config;
import io.airlift.configuration.DefunctConfig;
import io.airlift.http.client.HttpClientConfig;
import io.airlift.units.DataSize;
import io.airlift.units.DataSize.Unit;
Expand All @@ -26,6 +27,7 @@

import java.util.concurrent.TimeUnit;

@DefunctConfig("exchange.min-error-duration")
public class DirectExchangeClientConfig
{
private DataSize maxBufferSize = DataSize.of(32, Unit.MEGABYTE);
Expand Down Expand Up @@ -63,19 +65,6 @@ public DirectExchangeClientConfig setConcurrentRequestMultiplier(int concurrentR
return this;
}

@Deprecated
public Duration getMinErrorDuration()
{
return maxErrorDuration;
}

@Deprecated
@Config("exchange.min-error-duration")
public DirectExchangeClientConfig setMinErrorDuration(Duration minErrorDuration)
{
return this;
}

@NotNull
@MinDuration("1ms")
public Duration getMaxErrorDuration()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public void testDefaults()
.setQueryManagerExecutorPoolSize(5)
.setQueryExecutorPoolSize(1000)
.setMaxStateMachineCallbackThreads(5)
.setRemoteTaskMinErrorDuration(new Duration(5, MINUTES))
.setRemoteTaskMaxErrorDuration(new Duration(5, MINUTES))
.setRemoteTaskMaxCallbackThreads(1000)
.setQueryExecutionPolicy("phased")
Expand Down Expand Up @@ -122,7 +121,6 @@ public void testExplicitPropertyMappings()
.put("query.manager-executor-pool-size", "11")
.put("query.executor-pool-size", "111")
.put("query.max-state-machine-callback-threads", "112")
.put("query.remote-task.min-error-duration", "30s")
.put("query.remote-task.max-error-duration", "60s")
.put("query.remote-task.max-callback-threads", "10")
.put("query.execution-policy", "foo-bar-execution-policy")
Expand Down Expand Up @@ -185,7 +183,6 @@ public void testExplicitPropertyMappings()
.setQueryManagerExecutorPoolSize(11)
.setQueryExecutorPoolSize(111)
.setMaxStateMachineCallbackThreads(112)
.setRemoteTaskMinErrorDuration(new Duration(60, SECONDS))
.setRemoteTaskMaxErrorDuration(new Duration(60, SECONDS))
.setRemoteTaskMaxCallbackThreads(10)
.setQueryExecutionPolicy("foo-bar-execution-policy")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public void testDefaults()
assertRecordedDefaults(recordDefaults(DirectExchangeClientConfig.class)
.setMaxBufferSize(DataSize.of(32, Unit.MEGABYTE))
.setConcurrentRequestMultiplier(3)
.setMinErrorDuration(new Duration(5, TimeUnit.MINUTES))
.setMaxErrorDuration(new Duration(5, TimeUnit.MINUTES))
.setMaxResponseSize(new HttpClientConfig().getMaxContentLength())
.setPageBufferClientMaxCallbackThreads(25)
Expand All @@ -50,7 +49,6 @@ public void testExplicitPropertyMappings()
Map<String, String> properties = ImmutableMap.<String, String>builder()
.put("exchange.max-buffer-size", "1GB")
.put("exchange.concurrent-request-multiplier", "13")
.put("exchange.min-error-duration", "13s")
.put("exchange.max-error-duration", "33s")
.put("exchange.max-response-size", "1MB")
.put("exchange.client-threads", "2")
Expand All @@ -62,7 +60,6 @@ public void testExplicitPropertyMappings()
DirectExchangeClientConfig expected = new DirectExchangeClientConfig()
.setMaxBufferSize(DataSize.of(1, Unit.GIGABYTE))
.setConcurrentRequestMultiplier(13)
.setMinErrorDuration(new Duration(33, TimeUnit.SECONDS))
.setMaxErrorDuration(new Duration(33, TimeUnit.SECONDS))
.setMaxResponseSize(DataSize.of(1, Unit.MEGABYTE))
.setClientThreads(2)
Expand Down