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

Disable previous riak object after back-pressure sleep is triggered #1041

Merged
merged 2 commits into from
Jan 11, 2015

Conversation

shino
Copy link
Contributor

@shino shino commented Jan 7, 2015

When back-pressure sleep is triggered by many siblings, holding
previous object can lead to more siblings. This commit change the
behaivior and discard it.

This setting has effect only when all the following conditions are met:

  • Normal PUT Object, no effect for multipart upload
  • Overwriting existing object, no effect for new object
  • read_before_last_manifest_write=false, this setting was introduced in
    CS 1.5.3 and default is true

This PR addressed #1022 .

@shino shino added the Bug label Jan 7, 2015
@shino shino added this to the 1.5.4 milestone Jan 7, 2015
@kuenishi kuenishi self-assigned this Jan 8, 2015
@kuenishi
Copy link
Contributor

kuenishi commented Jan 8, 2015

I think this is a good change to add spec to riak_cs_manifest_fsm:get_and_update/4.

case maybe_backpressure_sleep(riakc_obj:value_count(RiakObject)) of
true ->
%% Backpressure sleep is triggered. Bacause holding
%% previous object can lead to more siblings, discard it.
Copy link
Contributor

Choose a reason for hiding this comment

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

My comment recommendation is:
"Backpressure sleep has been triggered. Current manifests folded by this FSM is to be discarded to prevent unnecessary interleaving by other concurrent manifest updates while this sleep."

@kuenishi
Copy link
Contributor

kuenishi commented Jan 8, 2015

All riak_test has passed. Will run sibling explosion test tomorrow.

When back-pressure sleep is triggered by many siblings, holding
previous object can lead to more siblings. This commit change the
behavior and discard it.

This setting has effect only when all the following conditions are met:
- Normal PUT Object, no effect for multipart upload
- Overwring existing object, no effect for new object
- read_before_last_manifest_write=false, this setting was introduced in
  CS 1.5.3 and default is true
@shino shino force-pushed the bugfix/disable-prev-after-backpressure-sleep branch from 1c9de96 to 2d68301 Compare January 8, 2015 05:40
@shino
Copy link
Contributor Author

shino commented Jan 8, 2015

Thanks for review.
Updated comment and added spec. Ready for review again.

@kuenishi
Copy link
Contributor

kuenishi commented Jan 9, 2015

Sibling explosion test result indicates that it endures twice more than before. Compare the number of lines until fail.

Now working on bors, failing on PLT recreation.

borshop added a commit that referenced this pull request Jan 11, 2015
…ssure-sleep

Disable previous riak object after back-pressure sleep is triggered

Reviewed-by: kuenishi
@kuenishi
Copy link
Contributor

@borshop merge

@borshop borshop merged commit 272ec8e into develop Jan 11, 2015
@kuenishi kuenishi deleted the bugfix/disable-prev-after-backpressure-sleep branch January 13, 2015 00:27
@shino shino removed this from the 1.5.4 milestone Jan 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants