kirktrue commented on PR #13591: URL: https://github.com/apache/kafka/pull/13591#issuecomment-1581446668
> ThreadLocal variables are not as frequently used in Kafka, but I can see a potential argument for usage here. One tricky part about thread locals is testing. Any ideas on how we could do this? Would we need to spin up a thread to assign the different boolean values? No, the test method would need to specifically mark its thread as wanting to poison the thread or not before running the rest of the test. In the `TransactionManagerTest`, there was only one place I had to specifically call it to get the tests to pass. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org