Skip to content
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

New implementation of PublisherInputStream that improves performance and fixes race conditions #1695

Merged
merged 2 commits into from
Apr 28, 2020

Conversation

spericas
Copy link
Member

New implementation of PublisherInputStream, now renamed to DataChunkInputStream. This new implementation fixes a couple of important problems:

  1. It implements the ability to read into byte arrays, not just one byte at a time for better performance and,

  2. It changes the implementation to avoid a race condition when accessing the data chunks held in CompletableFuture's. The race condition resulted in certain tests to hang if a thread raced and updated the value of the old processed variable.

There is also a new internal document docs-internal/datachunkinputstream.md that describes the new implementation. Credit to Oleksandr Otenko.

Signed-off-by: Santiago Pericasgeertsen santiago.pericasgeertsen@oracle.com

…nputStream. This new implementation fixes a couple of important problems: (1) It implements the ability to read into byte arrays, not just one byte at a time for better performance and (2) It changes the implementation to avoid a race condition when accessing the data chunks held in CompletableFuture's. The race condition resulted in certain tests to hang if a thread raced and updated the value of the old processed variable. There is also a new internal document docs-internal/datachunkinputstream.md that describes the new implementation.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
@spericas spericas added bug Something isn't working webserver 1.x Issues for 1.x version branch labels Apr 28, 2020
@spericas spericas requested a review from danielkec April 28, 2020 14:40
@spericas spericas self-assigned this Apr 28, 2020
Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
@spericas spericas merged commit 906111b into helidon-io:helidon-1.x Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x Issues for 1.x version branch bug Something isn't working webserver
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants