Skip to content

Commit 6244ef8

Browse files
cleanup
1 parent 68be3df commit 6244ef8

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

server/src/internalClusterTest/java/org/elasticsearch/index/shard/IndexShardIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ public void testShardWriteLoadsArePresent() {
394394
for (int i = 0; i < indexMetadata.getNumberOfShards(); i++) {
395395
final ShardId shardId = new ShardId(indexMetadata.getIndex(), i);
396396
assertTrue(shardWriteLoads.containsKey(shardId));
397-
logger.info("~~~shardWriteLoads: " + shardWriteLoads.get(shardId));
398397
maximumLoadRecorded = Math.max(shardWriteLoads.get(shardId), maximumLoadRecorded);
399398
}
400399
// Each index should have seen some write-load

server/src/main/java/org/elasticsearch/cluster/routing/ShardMovementWriteLoadSimulator.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,6 @@ public Map<String, NodeUsageStatsForThreadPools> simulatedNodeUsageStatsForThrea
8080
return Collections.unmodifiableMap(adjustedNodeUsageStatsForThreadPools);
8181
}
8282

83-
/**
84-
* averageThreadPoolUtilization
85-
* total shard execution time (sum of shard write loads) / total execution time (totalThreadPoolThreads x duration)
86-
* (30 + 20 + 40) / (4 x 30s) = 90 / 120 = .75
87-
*
88-
* writeLoadDelta / totalThreadPoolThreads
89-
* 20 / 4 = 5
90-
*
91-
*/
92-
9383
private static NodeUsageStatsForThreadPools.ThreadPoolUsageStats replaceWritePoolStats(
9484
NodeUsageStatsForThreadPools value,
9585
double writeLoadDelta

server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/WriteLoadConstraintDecider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public WriteLoadConstraintDecider(ClusterSettings clusterSettings) {
3939

4040
@Override
4141
public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) {
42-
if (writeLoadConstraintSettings.getWriteLoadConstraintEnabled() != WriteLoadConstraintSettings.WriteLoadDeciderStatus.ENABLED) {
42+
if (writeLoadConstraintSettings.getWriteLoadConstraintEnabled() == WriteLoadConstraintSettings.WriteLoadDeciderStatus.DISABLED) {
4343
return Decision.single(Decision.Type.YES, NAME, "Decider is disabled");
4444
}
4545

0 commit comments

Comments
 (0)