mapleFU commented on code in PR #41876:
URL: https://github.com/apache/arrow/pull/41876#discussion_r1632795180
##########
cpp/src/arrow/filesystem/s3fs.cc:
##########
@@ -1892,6 +1896,9 @@ class ObjectOutputStream final : public io::OutputStream {
}
// Notify completion
if (--state->parts_in_progress == 0) {
+ // GH-41862: avoid potential deadlock if the Future's callback is called
+ // with the mutex taken.
+ lock.unlock();
state->pending_parts_completed.MarkFinished(state->status);
Review Comment:
Ahhh, yes, it can. This is possible because the `Write` and
`HandleUploadOutcome` can run concurrently, we'd better do like
https://github.com/apache/arrow/pull/41876/files#r1631434845 to avoid mark
finish before a task is really finished
--
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]