Skip to content

Conversation

@BenWhitehead
Copy link
Collaborator

A ConcurrentModificationException could happen while cleaning up an individual read at the same time the session had multiple child streams.

…lose()

A ConcurrentModificationException could happen while cleaning up an individual read at the same time the session had multiple child streams.
@BenWhitehead BenWhitehead requested a review from a team as a code owner April 14, 2025 21:57
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: storage Issues related to the googleapis/java-storage API. labels Apr 14, 2025
}
} finally {
lock.unlock();
checkState(open, "Session already closed");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

locking has been moved into the new ConcurrentIdentityMap, and the try-finally has been removed changing the indentation.

}
open = false;
List<ApiFuture<Void>> closing =
children.drainEntries((subStream, subStreamState) -> subStream.closeAsync());
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the new method, instead of manually traversing the iterator

@BenWhitehead BenWhitehead merged commit 386d783 into main Apr 16, 2025
21 checks passed
@BenWhitehead BenWhitehead deleted the fix/conc-exception branch April 16, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/java-storage API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants