shaonan666 commented on issue #3569: URL: https://github.com/apache/logging-log4j2/issues/3569#issuecomment-2753530963
I checked the dump file and code, and it seems `GarbageFreeSortedArrayThreadContextMap` isn’t used. > In code you can check it with ProviderUtil.getProvider().getThreadContextMapInstance() In version 2.24.3, using ProviderUtil.getProvider().getThreadContextMapInstance(), I got DefaultThreadContextMap because GC_FREE_THREAD_CONTEXT_PROPERTY isn’t enabled https://github.com/apache/logging-log4j2/blob/4aa5efec7f2ee2d4623381cd66c3df3a16a6b9a9/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jProvider.java#L113-L116 https://github.com/apache/logging-log4j2/blob/4aa5efec7f2ee2d4623381cd66c3df3a16a6b9a9/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jProvider.java#L127-L129  > in previous versions with ThreadContext.getThreadContextMap() (which returns null for the default map). In version 2.23.1, using ThreadContext.getThreadContextMap() (which returns null for the default map), I got `CopyOnWriteSortedArrayThreadContextMap` based on this logic - `Constants.ENABLE_THREADLOCALS` is true because `isWebApp` is false - `GcFreeThreadContextKey` is false by default value https://github.com/apache/logging-log4j2/blob/fea2a7116160fb1555d578406444b4fc4f0ef2da/log4j-api/src/main/java/org/apache/logging/log4j/spi/ThreadContextMapFactory.java#L139-L146  Additionally, I couldn’t find `GarbageFreeSortedArrayThreadContextMap` in the dump files for either version. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org