quwin commented on code in PR #18172:
URL: https://github.com/apache/iceberg/pull/18172#discussion_r4054458188
##########
gcp/src/main/java/org/apache/iceberg/gcp/gcs/GCSOutputStream.java:
##########
Review Comment:
Could both write overloads reject writes once closed is true? On the
buffered path, close() sets closed , uploads the buffer, and clears buffer
, but stream still references the ByteArrayOutputStream . As a result,
write('B') after write('A'); close(); succeeds, increments the position and
metrics, and is never uploaded; the next close() is a no-op. This differs
from the previous WriteChannel path, which rejects the write with
ClosedChannelException . Please add a closed-state check before writing or
updating metrics, with coverage for both overloads.
--
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]