File tree 1 file changed +6
-1
lines changed
s3stream/src/main/java/com/automq/stream/s3/operator
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -163,8 +163,13 @@ public CompletableFuture<Void> close() {
163
163
164
164
@ Override
165
165
public CompletableFuture <Void > release () {
166
+ List <CompletableFuture <AbstractObjectStorage .ObjectStorageCompletedPart >> partsToWait = parts ;
167
+ if (objectPart != null ) {
168
+ // skip waiting for pending part
169
+ partsToWait = partsToWait .subList (0 , partsToWait .size () - 1 );
170
+ }
166
171
// wait for all ongoing uploading parts to finish and release pending part
167
- return CompletableFuture .allOf (parts .toArray (new CompletableFuture [0 ])).whenComplete ((nil , ex ) -> {
172
+ return CompletableFuture .allOf (partsToWait .toArray (new CompletableFuture [0 ])).whenComplete ((nil , ex ) -> {
168
173
if (objectPart != null ) {
169
174
objectPart .release ();
170
175
}
You can’t perform that action at this time.
0 commit comments