Use a lock instead of atomics for snapshot Progress (#11197)
* WIP. Typos and logging. * Format todos * Pause pruning while a snapshot is under way Logs, docs and todos * Allocate memory for the full chunk * Name snapshotting threads * Ensure `taking_snapshot` is set to false whenever and however `take_snapshot`returns Rename `take_at` to `request_snapshot_at` Cleanup * Let "in_progress" deletion fail Fix tests * Just use an atomic * Review grumbles * Finish the sentence * Resolve a few todos and clarify comments. * Calculate progress rate since last update * Lockfile * Fix tests * typo * Reinstate default snapshotting frequency Cut down on the logging noise * Use a lock instead of atomics for snapshot Progress * Update ethcore/types/src/snapshot.rs Co-Authored-By: Andronik Ordian <write@reusable.software> * Avoid truncating cast Cleanup
This commit is contained in:
@@ -2543,7 +2543,7 @@ impl SnapshotClient for Client {
|
||||
&self,
|
||||
writer: W,
|
||||
at: BlockId,
|
||||
p: &Progress,
|
||||
p: &RwLock<Progress>,
|
||||
) -> Result<(), EthcoreError> {
|
||||
if let Snapshotting::Unsupported = self.engine.snapshot_mode() {
|
||||
return Err(EthcoreError::Snapshot(SnapshotError::SnapshotsUnsupported));
|
||||
|
||||
Reference in New Issue
Block a user