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

skip_rewrites will only be feature driven #29468

Merged
merged 1 commit into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1378,13 +1378,6 @@ fn main() {
let no_os_memory_stats_reporting_arg = Arg::with_name("no_os_memory_stats_reporting")
.long("no-os-memory-stats-reporting")
.help("Disable reporting of OS memory statistics.");
let skip_rewrites_arg = Arg::with_name("accounts_db_skip_rewrites")
.long("accounts-db-skip-rewrites")
.help(
"Accounts that are rent exempt and have no changes are not rewritten. \
This produces snapshots that older versions cannot read.",
)
.hidden(true);
let accounts_db_skip_initial_hash_calc_arg =
Arg::with_name("accounts_db_skip_initial_hash_calculation")
.long("accounts-db-skip-initial-hash-calculation")
Expand Down Expand Up @@ -1777,7 +1770,6 @@ fn main() {
.arg(&accounts_filler_count)
.arg(&accounts_filler_size)
.arg(&verify_index_arg)
.arg(&skip_rewrites_arg)
.arg(&accounts_db_skip_initial_hash_calc_arg)
.arg(&ancient_append_vecs)
.arg(&halt_at_slot_store_hash_raw_data)
Expand Down Expand Up @@ -1835,7 +1827,6 @@ fn main() {
.about("Create a new ledger snapshot")
.arg(&no_snapshot_arg)
.arg(&account_paths_arg)
.arg(&skip_rewrites_arg)
.arg(&accounts_db_skip_initial_hash_calc_arg)
.arg(&ancient_append_vecs)
.arg(&hard_forks_arg)
Expand Down Expand Up @@ -2733,7 +2724,6 @@ fn main() {
index: Some(accounts_index_config),
accounts_hash_cache_path: Some(ledger_path.clone()),
filler_accounts_config,
skip_rewrites: arg_matches.is_present("accounts_db_skip_rewrites"),
ancient_append_vec_offset: value_t!(
matches,
"accounts_db_ancient_append_vecs",
Expand Down Expand Up @@ -3002,7 +2992,6 @@ fn main() {
);

let accounts_db_config = Some(AccountsDbConfig {
skip_rewrites: arg_matches.is_present("accounts_db_skip_rewrites"),
ancient_append_vec_offset: value_t!(
matches,
"accounts_db_ancient_append_vecs",
Expand Down
12 changes: 0 additions & 12 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ pub const ACCOUNTS_DB_CONFIG_FOR_TESTING: AccountsDbConfig = AccountsDbConfig {
accounts_hash_cache_path: None,
filler_accounts_config: FillerAccountsConfig::const_default(),
write_cache_limit_bytes: None,
skip_rewrites: false,
ancient_append_vec_offset: None,
skip_initial_hash_calc: false,
exhaustively_verify_refcounts: false,
Expand All @@ -363,7 +362,6 @@ pub const ACCOUNTS_DB_CONFIG_FOR_BENCHMARKS: AccountsDbConfig = AccountsDbConfig
accounts_hash_cache_path: None,
filler_accounts_config: FillerAccountsConfig::const_default(),
write_cache_limit_bytes: None,
skip_rewrites: false,
ancient_append_vec_offset: None,
skip_initial_hash_calc: false,
exhaustively_verify_refcounts: false,
Expand Down Expand Up @@ -420,7 +418,6 @@ pub struct AccountsDbConfig {
pub accounts_hash_cache_path: Option<PathBuf>,
pub filler_accounts_config: FillerAccountsConfig,
pub write_cache_limit_bytes: Option<u64>,
pub skip_rewrites: bool,
/// if None, ancient append vecs are disabled
/// Some(offset) means include slots up to (max_slot - (slots_per_epoch - 'offset'))
pub ancient_append_vec_offset: Option<Slot>,
Expand Down Expand Up @@ -1268,9 +1265,6 @@ pub struct AccountsDb {
/// slot that is one epoch older than the highest slot where accounts hash calculation has completed
pub accounts_hash_complete_one_epoch_old: RwLock<Slot>,

/// true iff rent exempt accounts are not rewritten in their normal rent collection slot
pub skip_rewrites: bool,

/// Some(offset) iff we want to squash old append vecs together into 'ancient append vecs'
/// Some(offset) means for slots up to (max_slot - (slots_per_epoch - 'offset')), put them in ancient append vecs
pub ancient_append_vec_offset: Option<Slot>,
Expand Down Expand Up @@ -2298,7 +2292,6 @@ impl AccountsDb {
filler_account_slots_remaining: AtomicU64::default(),
active_stats: ActiveStats::default(),
accounts_hash_complete_one_epoch_old: RwLock::default(),
skip_rewrites: false,
skip_initial_hash_calc: false,
ancient_append_vec_offset: None,
accounts_index,
Expand Down Expand Up @@ -2396,10 +2389,6 @@ impl AccountsDb {
.as_ref()
.map(|config| config.filler_accounts_config)
.unwrap_or_default();
let skip_rewrites = accounts_db_config
.as_ref()
.map(|config| config.skip_rewrites)
.unwrap_or_default();
let skip_initial_hash_calc = accounts_db_config
.as_ref()
.map(|config| config.skip_initial_hash_calc)
Expand All @@ -2423,7 +2412,6 @@ impl AccountsDb {
let paths_is_empty = paths.is_empty();
let mut new = Self {
paths,
skip_rewrites,
skip_initial_hash_calc,
ancient_append_vec_offset,
cluster_type: Some(*cluster_type),
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5337,7 +5337,7 @@ impl Bank {
let mut time_collecting_rent_us = 0;
let mut time_hashing_skipped_rewrites_us = 0;
let mut time_storing_accounts_us = 0;
let can_skip_rewrites = self.rc.accounts.accounts_db.skip_rewrites;
let can_skip_rewrites = false; // this will be goverened by a feature soon
let set_exempt_rent_epoch_max: bool = self
.feature_set
.is_active(&solana_sdk::feature_set::set_exempt_rent_epoch_max::id());
Expand Down
1 change: 0 additions & 1 deletion validator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,6 @@ pub fn main() {
write_cache_limit_bytes: value_t!(matches, "accounts_db_cache_limit_mb", u64)
.ok()
.map(|mb| mb * MB as u64),
skip_rewrites: matches.is_present("accounts_db_skip_rewrites"),
ancient_append_vec_offset: value_t!(matches, "accounts_db_ancient_append_vecs", u64).ok(),
exhaustively_verify_refcounts: matches.is_present("accounts_db_verify_refcounts"),
..AccountsDbConfig::default()
Expand Down