Name snapshots consistently (#19346)

#### Problem

Snapshot names are overloaded, and there are multiple terms that mean the same thing. This is confusing. Here's a list of ones in the codebase that I've found:

```
- snapshot_dir
- snapshots_dir
- snapshot_path
- snapshot_output_dir
- snapshot_package_output_path
- snapshot_archives_dir
```

#### Summary of Changes

For all the ones that are about the directory where snapshot archives are stored, ensure they are `snapshot_archives_dir`. For the ones about the (bank) snapshots directory, set to `bank_snapshots_dir`.


Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
Brooks Prumo
2021-08-21 15:41:03 -05:00
committed by GitHub
parent 9483866e0b
commit 6d939811e9
19 changed files with 237 additions and 221 deletions

View File

@@ -175,8 +175,8 @@ impl SnapshotRequestHandler {
&snapshot_root_bank,
status_cache_slot_deltas,
&self.accounts_package_sender,
&self.snapshot_config.snapshot_path,
&self.snapshot_config.snapshot_package_output_path,
&self.snapshot_config.bank_snapshots_dir,
&self.snapshot_config.snapshot_archives_dir,
self.snapshot_config.snapshot_version,
&self.snapshot_config.archive_format,
hash_for_testing,
@@ -192,7 +192,7 @@ impl SnapshotRequestHandler {
// Cleanup outdated snapshots
let mut purge_old_snapshots_time = Measure::start("purge_old_snapshots_time");
snapshot_utils::purge_old_bank_snapshots(&self.snapshot_config.snapshot_path);
snapshot_utils::purge_old_bank_snapshots(&self.snapshot_config.bank_snapshots_dir);
purge_old_snapshots_time.stop();
total_time.stop();