Copilot commented on code in PR #3837:
URL: https://github.com/apache/celeborn/pull/3837#discussion_r3924251454
##########
worker/src/main/java/org/apache/celeborn/service/deploy/worker/storage/PartitionDataWriter.java:
##########
@@ -265,6 +265,11 @@ public PartitionSplitMode getSplitMode() {
@Override
public void notifyError(String mountPoint, DiskStatus diskStatus) {
+ // A committed file is already flushed and visible to fetch requests,
+ // a device error broadcast must not destroy it.
+ if (currentTierWriter.committed()) {
+ return;
+ }
Review Comment:
`notifyError` checks `currentTierWriter.committed()` outside the writer
lock, then calls the synchronized `destroy()`. If a device error broadcast
arrives while `close()` is executing, `notifyError` can observe `committed ==
false`, block on `destroy()` until `close()` finishes (and sets `committed =
true`), and then still destroy/delete the now-committed file. To make the guard
effective, perform the committed check after acquiring the same monitor used by
`close()`/`destroy()` (or otherwise ensure the check and destroy target the
same writer instance).
--
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]