Skip to content

Commit 2858d6a

Browse files
authored
Remove trace logger in Transformer on default path when a class doesn't need to be transformed. (#136152)
This trace log badly interfered with entitlements in tests. When a class (eg Regex, used by the test mock logger in the case of JULBridgeTests) is loaded as a result of logging, tracing logging that in the Transformer causes a recursive call to the logging appender. Fixes #132280
1 parent eda59f1 commit 2858d6a

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

libs/entitlement/src/main/java/org/elasticsearch/entitlement/instrumentation/Transformer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ public byte[] transform(
6262
// effectively the same as returning null anyways, so we instead log it here completely
6363
return null;
6464
}
65-
} else {
66-
logger.trace("Not transforming " + className);
67-
return null;
6865
}
66+
return null;
6967
}
7068
}

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,6 @@ tests:
369369
- class: org.elasticsearch.xpack.sql.qa.mixed_node.SqlCompatIT
370370
method: testNullsOrderWithMissingOrderSupportQueryingNewNode
371371
issue: https://github.com/elastic/elasticsearch/issues/132249
372-
- class: org.elasticsearch.common.logging.JULBridgeTests
373-
method: testThrowable
374-
issue: https://github.com/elastic/elasticsearch/issues/132280
375372
- class: org.elasticsearch.xpack.ml.integration.AutodetectMemoryLimitIT
376373
method: testManyDistinctOverFields
377374
issue: https://github.com/elastic/elasticsearch/issues/132308

0 commit comments

Comments
 (0)