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

Add script to repair invalid gc manifests #983

Merged
merged 4 commits into from
Oct 7, 2014

Conversation

shino
Copy link
Contributor

@shino shino commented Oct 1, 2014

This PR addresses the remaining part of #827 .
( #964 is another part)

This PR adds a script to repair invalid state manifests in GC bucket when

  • manifest in GC bucket is active and
  • corresponding actual manifest (in 0o:* bucket) is pending_delete, scheduled_delete or notfound

@shino
Copy link
Contributor Author

shino commented Oct 1, 2014

Still WIP, now debugging...
Active state remain after single run of repair script 😿
https://gist.github.com/shino/8940d7bacfa2b2fbb9e7

@shino shino force-pushed the feature/repair-invalid-gc-manifests branch from 3d39c4c to 4ed9b7c Compare October 2, 2014 02:39
@shino shino force-pushed the feature/repair-invalid-gc-manifests branch from 4ed9b7c to df9c7d1 Compare October 2, 2014 04:29
@shino shino changed the title WIP: Add script to repair invalid gc manifests Add script to repair invalid gc manifests Oct 2, 2014
@shino
Copy link
Contributor Author

shino commented Oct 2, 2014

I hope this is ready for review.
The bug I described above can not be reproduced in riak_test.

@shino
Copy link
Contributor Author

shino commented Oct 2, 2014

Fix riak_test gc_tests failure in multibag config by 767fbc0.

Please review with basho/riak_cs_multibag#13 (for {flavor, {multibag, disjoint}} )

@kuenishi
Copy link
Contributor

kuenishi commented Oct 6, 2014

If we use this script in multibag, do we have to run this script in the CS node directly connecting to the Riak cluster where invalid state manifests are in GC bucket?

case riakc_pb_socket:start_link(Host, Port) of
{ok, Pbc} ->
repair(Pbc, Options),
timer:sleep(100);
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer riakc_pb_socket:stop/1 called here, not in the tail of function call chain.

@kuenishi
Copy link
Contributor

kuenishi commented Oct 6, 2014

Ah, I got it. It doesn't access riak via CS, but directly hits riak.

@@ -54,5 +54,5 @@

{deps_ee, [
{riak_repl_pb_api,".*",{git,"git@github.com:basho/riak_repl_pb_api.git", {tag, "0.2.5"}}},
{riak_cs_multibag,".*",{git,"git@github.com:basho/riak_cs_multibag.git", {tag, "1.5.0"}}}
{riak_cs_multibag,".*",{git,"git@github.com:basho/riak_cs_multibag.git", {branch, "master"}}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget to update this before code freeze!

borshop added a commit that referenced this pull request Oct 6, 2014
Add script to repair invalid gc manifests

Reviewed-by: kuenishi
@kuenishi
Copy link
Contributor

kuenishi commented Oct 7, 2014

@borshop merge

@borshop borshop merged commit 767fbc0 into release/1.5 Oct 7, 2014
@shino shino deleted the feature/repair-invalid-gc-manifests branch October 7, 2014 01:54
@shino shino modified the milestone: 1.5.2 Oct 9, 2014
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.

3 participants