Skip to content

"collision in threads table" using CompletableFutures and Java 16+ #29

@KristofferSmedlund

Description

@KristofferSmedlund

In Java 17, a security fix was applied. All tasks that are executed within ForkJoinPool.commonPool will clear all ThreadLocal data for that thread after the task is completed.

This breaks the way that the scalyr-logback appender handles multi threaded logging since the EventUploader.java class has the state for the thread in its map but the Events.java class cant find it's threadlocal value. It ends in the assert giving an error with the message "collision in threads table".

Logstash logback appender has already solved this:
logfellow/logstash-logback-encoder#722

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions