Skip to content

Commit e7aab5b

Browse files
authored
Move some deprecation warnings to critical (#116969)
* Move some deprecation warnings to critical * Fix tests * Fix another test * Leave Fractional Bytes as warn for now. There's more going on with this one. Let's leave it alone and hand it in its own PR.
1 parent f2e457c commit e7aab5b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

server/src/main/java/org/elasticsearch/common/time/DateUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public class DateUtils {
170170
public static ZoneId of(String zoneId) {
171171
String deprecatedId = DEPRECATED_SHORT_TIMEZONES.get(zoneId);
172172
if (deprecatedId != null) {
173-
deprecationLogger.warn(
173+
deprecationLogger.critical(
174174
DeprecationCategory.PARSING,
175175
"timezone",
176176
"Use of short timezone id " + zoneId + " is deprecated. Use " + deprecatedId + " instead"

server/src/main/java/org/elasticsearch/common/unit/MemorySizeValue.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ private static ByteSizeValue parseHeapRatio(String sValue, String settingName, d
5959
throw new ElasticsearchParseException("percentage should be in [0-100], got [{}]", percentAsString);
6060
} else if (percent < minHeapPercent) {
6161
DeprecationLogger.getLogger(MemorySizeValue.class)
62-
.warn(
62+
.critical(
6363
DeprecationCategory.SETTINGS,
6464
"memory_size_below_minimum",
65-
"[{}] setting of [{}] is below the recommended minimum of {}% of the heap",
65+
"[{}] setting of [{}] is below the minimum of {}% of the heap",
6666
settingName,
6767
sValue,
6868
minHeapPercent

server/src/test/java/org/elasticsearch/common/settings/MemorySizeSettingsTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ public void testCircuitBreakerSettings() {
7272
"indices.breaker.total.limit",
7373
ByteSizeValue.ofBytes((long) (JvmInfo.jvmInfo().getMem().getHeapMax().getBytes() * defaultTotalPercentage))
7474
);
75-
assertWarnings(
76-
"[indices.breaker.total.limit] setting of [25%] is below the recommended minimum of 50.0% of the heap",
75+
assertCriticalWarnings(
76+
"[indices.breaker.total.limit] setting of [25%] is below the minimum of 50.0% of the heap",
7777
"[indices.breaker.total.limit] should be specified using a percentage of the heap. "
7878
+ "Absolute size settings will be forbidden in a future release"
7979
);

server/src/test/java/org/elasticsearch/indices/breaker/HierarchyCircuitBreakerServiceTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ public void testSizeBelowMinimumWarning() {
877877
HierarchyCircuitBreakerService.TOTAL_CIRCUIT_BREAKER_LIMIT_SETTING.getKey(),
878878
20
879879
);
880-
assertWarnings("[indices.breaker.total.limit] setting of [19%] is below the recommended minimum of 20.0% of the heap");
880+
assertCriticalWarnings("[indices.breaker.total.limit] setting of [19%] is below the minimum of 20.0% of the heap");
881881
}
882882

883883
public void testBuildParentTripMessage() {

x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/execution/sequence/CircuitBreakerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ public void testEqlCBCleanedUp_on_ParentCBBreak() {
303303
);
304304
window.execute(wrap(p -> fail(), ex -> assertTrue(ex instanceof CircuitBreakingException)));
305305
}
306-
assertCriticalWarnings("[indices.breaker.total.limit] setting of [0%] is below the recommended minimum of 50.0% of the heap");
306+
assertCriticalWarnings("[indices.breaker.total.limit] setting of [0%] is below the minimum of 50.0% of the heap");
307307
}
308308

309309
private List<BreakerSettings> breakerSettings() {

0 commit comments

Comments
 (0)