Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Prevent going offline when restoring or taking a snapshot #6694

Merged
merged 1 commit into from
Oct 12, 2017
Merged

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Oct 10, 2017

Closes #6484

@arkpar arkpar added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. B0-patch labels Oct 10, 2017
@arkpar arkpar requested a review from rphmeier October 10, 2017 18:34
@5chdn 5chdn added this to the Patch milestone Oct 10, 2017
@5chdn 5chdn mentioned this pull request Oct 10, 2017
67 tasks
snapshot::take_snapshot(&*self.engine, &self.chain.read(), start_hash, db.as_hashdb(), writer, p)?;
self.taking_snapshot.store(false, AtomicOrdering::Relaxed);
Copy link
Contributor

@rphmeier rphmeier Oct 11, 2017

Choose a reason for hiding this comment

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

prefer AcqRel or stronger. it's not a bottleneck and Relaxed is fine but it's better not to use it in general.

@rphmeier
Copy link
Contributor

When taking a snapshot it should be fine though, since that doesn't draw from the network. Actually if you go offline halfway through it will be more likely to succeed because states are less likely to be pruned out.

@arkpar
Copy link
Collaborator Author

arkpar commented Oct 12, 2017

@rphmeier good point

@debris debris added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Oct 12, 2017
@debris debris merged commit e51e54e into master Oct 12, 2017
debris added a commit that referenced this pull request Oct 12, 2017
@5chdn 5chdn deleted the no-sleep branch January 3, 2018 19:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants