novisfff commented on code in PR #6383:
URL: https://github.com/apache/hudi/pull/6383#discussion_r945447878


##########
hudi-timeline-service/src/main/java/org/apache/hudi/timeline/service/handlers/marker/MarkerCreationDispatchingRunnable.java:
##########
@@ -66,8 +66,9 @@ public void run() {
 
     // Only fetch pending marker creation requests that can be processed,
     // i.e., that markers can be written to a underlying file
-    for (String markerDir : markerDirStateMap.keySet()) {
-      MarkerDirState markerDirState = markerDirStateMap.get(markerDir);
+    for (Map.Entry<String, MarkerDirState> entry : 
markerDirStateMap.entrySet()) {
+      String markerDir = entry.getKey();
+      MarkerDirState markerDirState = entry.getValue();

Review Comment:
   but markerDirStateMap is not thread safe. request add/delete MarkerDirState 
in markerDirStateMap, and MarkerCreationDispatching traversal markerDirStateMap 
in other thread. use hashMap may cause ConcurrentModificationException, and 
ConcurrentHashMap can fix it.



-- 
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]

Reply via email to