Repository navigation
Fix reads across chunk boundaries - #350
Merged
felixbuenemann merged 2 commits intoSep 5, 2020
Merged
felixbuenemann merged 2 commits into
felixbuenemann merged 2 commits into
Conversation
1 task done
Collaborator
Author
|
Update: Implemented in d389ce4. |
Collaborator
Author
|
OK, requesting the chunk slices in parallel was a real pain in the ass to implement, but it works fine now. |
Collaborator
Author
|
Btw. this can also happen when max_readahead is set with buffered io. |
felixbuenemann
force-pushed
the
fix-reads-across-chunk-boundaries
branch
3 times, most recently
from
September 5, 2020 21:59
e338984 to
051544d
Compare
When using Direct-IO requests are not guaranteed to be aligned on page size boundary, like with buffered IO. This means a read request can start at the end of one chunk and finish at the beginning of the next chunk. In cases where this happens we now request multiple chunks in GetChunk and assemble the response data.
This improved performance, since we don't have to wait for each slice sequentially, but can request them all at once. Since the channel order does not have to match the request order, we track a sequence number with each request to allow reassembly of the response out of order.
felixbuenemann
force-pushed
the
fix-reads-across-chunk-boundaries
branch
from
September 5, 2020 23:26
051544d to
8d4122a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using Direct-IO requests are not guaranteed to be aligned on page
size boundary, like with buffered IO. This means a read request can
start at the end of one chunk and finish at the beginning of the next
chunk. In cases where this happens we now request multiple chunks in
GetChunk and assemble the response data.
This also removed the float conversions in
adjustResponseChunk.IMPORTANT: Must be merged after #349 to avoid corruption, since we would repeat the off-by-one byte.
ToDos: