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

fix: avoid dropping attachment chunks on quorum writes #3715

Merged
merged 1 commit into from Aug 26, 2021

Conversation

janl
Copy link
Member

@janl janl commented Aug 26, 2021

This only applies to databases that have an n > [cluster] n.

Our middleman() function that proxies attachment streams from
the incoming HTTP socket on the coordinating node to the target
shard-bearing nodes used the server config to determine whether
it should start dropping chunks from the stream.

If a database was created with a larger n, the middleman()
function could have started to drop attachment chunks before
all attached nodes had a chance to receive it.

This fix uses a database’s concrete n value rather than the
server config default value.

Co-Authored-By: James Coglan jcoglan@gmail.com
Co-Authored-By: Robert Newson rnewson@apache.org

Copy link
Contributor

@nickva nickva left a comment

Choose a reason for hiding this comment

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

+1

This only applies to databases that have an n > [cluster] n.

Our `middleman()` function that proxies attachment streams from
the incoming HTTP socket on the coordinating node to the target
shard-bearing nodes used the server config to determine whether
it should start dropping chunks from the stream.

If a database was created with a larger `n`, the `middleman()`
function could have started to drop attachment chunks before
all attached nodes had a chance to receive it.

This fix uses a database’s concrete `n` value rather than the
server config default value.

Co-Authored-By: James Coglan <jcoglan@gmail.com>
Co-Authored-By: Robert Newson <rnewson@apache.org>
@janl janl force-pushed the fix/attachment-writers-larger-n branch from 261b90a to 9b30ada Compare August 26, 2021 15:39
@janl janl merged commit 9e3d540 into 3.x Aug 26, 2021
@janl janl deleted the fix/attachment-writers-larger-n branch August 26, 2021 16:05
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.

None yet

2 participants