reswqa commented on code in PR #20371:
URL: https://github.com/apache/flink/pull/20371#discussion_r930862568
##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/HsBufferContext.java:
##########
@@ -97,24 +97,40 @@ public Optional<CompletableFuture<Void>> getSpilledFuture()
{
return Optional.ofNullable(spilledFuture);
}
- public void release() {
- checkState(!released, "Release buffer repeatedly is unexpected.");
+ /**
+ * Mark buffer status to release.
+ *
+ * @return Whether the status has been modified successfully. If it has
been released, false
+ * will be returned.
+ */
+ public boolean release() {
Review Comment:
good catch.
--
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]