Skip to content

Fix race condition in FileAsyncResponseTransformer #827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 16, 2018

Conversation

varunnvs92
Copy link
Contributor

Fix race condition in FileAsyncResponseTransformer where future can be completed before last bytebuffer is written to the file

@varunnvs92 varunnvs92 requested a review from shorea November 15, 2018 05:20
@varunnvs92 varunnvs92 force-pushed the FileAsyncResponseTransformerFix branch from 48c390c to a5ce1ff Compare November 15, 2018 19:12
}

private void close() {
if (fileChannel != null) {
invokeSafely(fileChannel::close);
}
future.complete(null);
Copy link
Contributor

Choose a reason for hiding this comment

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

if the file channel fails to close should we complete the future exceptionally?

…e completed before last bytebuffer is written to the file
@varunnvs92 varunnvs92 force-pushed the FileAsyncResponseTransformerFix branch from a5ce1ff to 15681db Compare November 16, 2018 04:28
@varunnvs92 varunnvs92 merged commit fee061b into master Nov 16, 2018
@varunnvs92 varunnvs92 deleted the FileAsyncResponseTransformerFix branch November 16, 2018 18:18
aws-sdk-java-automation added a commit that referenced this pull request May 4, 2020
…9a1b1712

Pull request: release <- staging/77687b6f-1aea-41e5-8d4d-bdfd9a1b1712
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants