rickyma commented on code in PR #1866:
URL:
https://github.com/apache/incubator-uniffle/pull/1866#discussion_r1686245531
##########
server/src/main/java/org/apache/uniffle/server/ShuffleFlushManager.java:
##########
@@ -168,12 +171,20 @@ public void processFlushEvent(ShuffleDataFlushEvent
event) throws Exception {
storageDataReplica,
user,
maxConcurrencyPerPartitionToWrite);
- ShuffleWriteHandler handler = storage.getOrCreateWriteHandler(request);
- long startTime = System.currentTimeMillis();
- boolean writeSuccess = storageManager.write(storage, handler, event);
- if (!writeSuccess) {
- throw new EventRetryException();
+
+ long startTime = 0L;
+ try {
+ ShuffleWriteHandler handler = storage.getOrCreateWriteHandler(request);
+ startTime = System.currentTimeMillis();
+ boolean writeSuccess = storageManager.write(storage, handler, event);
+ if (!writeSuccess) {
+ shuffleIdsWithWriteError.add(event.getShuffleId());
Review Comment:
I don't think this is thread-safe.
It could be overwritten by other threads, which may be successful.
You need to consider concurrency problems through this PR.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]