Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
Description
When parallel query compilation is enabled, it is possible for concurrent running threads to create TezWork objects that have the same dag id. This is because the counter used to obtain the next dag id is not thread safe. The counter should be an AtomicInteger rather than an int.
private static int counter; ... public TezWork(String queryId, Configuration conf) { this.dagId = queryId + ":" + (++counter); ... }