AHeise commented on code in PR #29353:
URL: https://github.com/apache/flink/pull/29353#discussion_r4163417456
##########
flink-table/flink-table-code-splitter/src/main/java/org/apache/flink/table/codesplit/CodeSplitUtil.java:
##########
@@ -29,14 +29,20 @@
@Internal
public class CodeSplitUtil {
- private static final AtomicLong COUNTER = new AtomicLong(0L);
+ // Per-thread, reset per split() run, so identical input yields identical
names.
+ private static final ThreadLocal<AtomicLong> COUNTER =
+ ThreadLocal.withInitial(() -> new AtomicLong(0L));
Review Comment:
If it's thread-local now. Do we even need an AtomicLong?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]