You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: server/src/main/java/org/elasticsearch/action/admin/cluster/allocation/TransportGetAllocationStatsAction.java
+2-9Lines changed: 2 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -224,29 +224,22 @@ private static class AllocationStatsCache {
224
224
225
225
voidsetTTL(TimeValuettl) {
226
226
ttlMillis = ttl.millis();
227
-
228
227
if (ttlMillis == 0L) {
229
228
cachedStats.set(null);
230
229
}
231
230
}
232
231
233
232
Map<String, NodeAllocationStats> get() {
234
-
235
233
if (ttlMillis == 0L) {
236
234
returnnull;
237
235
}
238
236
237
+
// We don't set the atomic ref to null here upon expiration since we know it is about to be replaced with a fresh instance.
Copy file name to clipboardExpand all lines: server/src/test/java/org/elasticsearch/action/admin/cluster/allocation/TransportGetAllocationStatsActionTests.java
+14-13Lines changed: 14 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -74,9 +74,7 @@ public void setUp() throws Exception {
0 commit comments