mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 06:25:07 +00:00
Deprecate fixed_auto_queue_size thread pool type (#52399)
Relates #52280
This commit is contained in:
parent
087ceb899b
commit
d76358c875
@ -125,6 +125,9 @@ thread_pool:
|
|||||||
|
|
||||||
experimental[]
|
experimental[]
|
||||||
|
|
||||||
|
deprecated[7.7.0,The experimental `fixed_auto_queue_size` thread pool type is
|
||||||
|
deprecated and will be removed in 8.0.]
|
||||||
|
|
||||||
The `fixed_auto_queue_size` thread pool holds a fixed size of threads to handle
|
The `fixed_auto_queue_size` thread pool holds a fixed size of threads to handle
|
||||||
the requests with a bounded queue for pending requests that have no threads to
|
the requests with a bounded queue for pending requests that have no threads to
|
||||||
service them. It's similar to the `fixed` threadpool, however, the `queue_size`
|
service them. It's similar to the `fixed` threadpool, however, the `queue_size`
|
||||||
|
@ -67,11 +67,13 @@ public final class AutoQueueAdjustingExecutorBuilder extends ExecutorBuilder<Aut
|
|||||||
final String frameSizeKey = settingsKey(prefix, "auto_queue_frame_size");
|
final String frameSizeKey = settingsKey(prefix, "auto_queue_frame_size");
|
||||||
final String targetedResponseTimeKey = settingsKey(prefix, "target_response_time");
|
final String targetedResponseTimeKey = settingsKey(prefix, "target_response_time");
|
||||||
this.targetedResponseTimeSetting = Setting.timeSetting(targetedResponseTimeKey, TimeValue.timeValueSeconds(1),
|
this.targetedResponseTimeSetting = Setting.timeSetting(targetedResponseTimeKey, TimeValue.timeValueSeconds(1),
|
||||||
TimeValue.timeValueMillis(10), Setting.Property.NodeScope);
|
TimeValue.timeValueMillis(10), Setting.Property.NodeScope, Setting.Property.Deprecated);
|
||||||
this.queueSizeSetting = Setting.intSetting(queueSizeKey, initialQueueSize, Setting.Property.NodeScope);
|
this.queueSizeSetting = Setting.intSetting(queueSizeKey, initialQueueSize, Setting.Property.NodeScope);
|
||||||
// These temp settings are used to validate the min and max settings below
|
// These temp settings are used to validate the min and max settings below
|
||||||
Setting<Integer> tempMaxQueueSizeSetting = Setting.intSetting(maxSizeKey, maxQueueSize, Setting.Property.NodeScope);
|
Setting<Integer> tempMaxQueueSizeSetting = Setting.intSetting(maxSizeKey, maxQueueSize, Setting.Property.NodeScope,
|
||||||
Setting<Integer> tempMinQueueSizeSetting = Setting.intSetting(minSizeKey, minQueueSize, Setting.Property.NodeScope);
|
Setting.Property.Deprecated);
|
||||||
|
Setting<Integer> tempMinQueueSizeSetting = Setting.intSetting(minSizeKey, minQueueSize, Setting.Property.NodeScope,
|
||||||
|
Setting.Property.Deprecated);
|
||||||
|
|
||||||
this.minQueueSizeSetting = new Setting<>(
|
this.minQueueSizeSetting = new Setting<>(
|
||||||
minSizeKey,
|
minSizeKey,
|
||||||
@ -126,8 +128,9 @@ public final class AutoQueueAdjustingExecutorBuilder extends ExecutorBuilder<Aut
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
Setting.Property.NodeScope);
|
Setting.Property.NodeScope, Setting.Property.Deprecated);
|
||||||
this.frameSizeSetting = Setting.intSetting(frameSizeKey, frameSize, 100, Setting.Property.NodeScope);
|
this.frameSizeSetting = Setting.intSetting(frameSizeKey, frameSize, 100, Setting.Property.NodeScope, Setting.Property.Deprecated,
|
||||||
|
Setting.Property.Deprecated);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -78,6 +78,8 @@ public class AutoQueueAdjustingExecutorBuilderTests extends ESThreadPoolTestCase
|
|||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
assertEquals(e.getMessage(), "Failed to parse value [100] for setting [thread_pool.test.min_queue_size] must be <= 99");
|
assertEquals(e.getMessage(), "Failed to parse value [100] for setting [thread_pool.test.min_queue_size] must be <= 99");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assertSettingDeprecationsAndWarnings(new String[]{"thread_pool.test.max_queue_size"});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSetLowerSettings() {
|
public void testSetLowerSettings() {
|
||||||
@ -89,6 +91,8 @@ public class AutoQueueAdjustingExecutorBuilderTests extends ESThreadPoolTestCase
|
|||||||
AutoQueueAdjustingExecutorBuilder.AutoExecutorSettings s = test.getSettings(settings);
|
AutoQueueAdjustingExecutorBuilder.AutoExecutorSettings s = test.getSettings(settings);
|
||||||
assertEquals(10, s.maxQueueSize);
|
assertEquals(10, s.maxQueueSize);
|
||||||
assertEquals(10, s.minQueueSize);
|
assertEquals(10, s.minQueueSize);
|
||||||
|
|
||||||
|
assertSettingDeprecationsAndWarnings(new String[]{"thread_pool.test.min_queue_size", "thread_pool.test.max_queue_size"});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSetHigherSettings() {
|
public void testSetHigherSettings() {
|
||||||
@ -100,6 +104,8 @@ public class AutoQueueAdjustingExecutorBuilderTests extends ESThreadPoolTestCase
|
|||||||
AutoQueueAdjustingExecutorBuilder.AutoExecutorSettings s = test.getSettings(settings);
|
AutoQueueAdjustingExecutorBuilder.AutoExecutorSettings s = test.getSettings(settings);
|
||||||
assertEquals(3000, s.maxQueueSize);
|
assertEquals(3000, s.maxQueueSize);
|
||||||
assertEquals(2000, s.minQueueSize);
|
assertEquals(2000, s.minQueueSize);
|
||||||
|
|
||||||
|
assertSettingDeprecationsAndWarnings(new String[]{"thread_pool.test.min_queue_size", "thread_pool.test.max_queue_size"});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user