Remove activated evict_invalid_stakes_cache_entries feature (#25739)
This commit is contained in:
parent
81231a89b9
commit
6fc057c1d9
|
@ -3085,13 +3085,9 @@ impl Bank {
|
|||
metrics.invalid_cached_vote_accounts += invalid_cached_vote_accounts;
|
||||
metrics.invalid_cached_stake_accounts += invalid_cached_stake_accounts;
|
||||
metrics.vote_accounts_cache_miss_count += vote_accounts_cache_miss_count;
|
||||
let evict_invalid_stakes_cache_entries = self
|
||||
.feature_set
|
||||
.is_active(&feature_set::evict_invalid_stakes_cache_entries::id());
|
||||
self.stakes_cache.handle_invalid_keys(
|
||||
invalid_stake_keys,
|
||||
invalid_vote_keys,
|
||||
evict_invalid_stakes_cache_entries,
|
||||
self.slot(),
|
||||
);
|
||||
vote_with_stake_delegations_map
|
||||
|
|
|
@ -119,7 +119,6 @@ impl StakesCache {
|
|||
&self,
|
||||
invalid_stake_keys: DashMap<Pubkey, InvalidCacheEntryReason>,
|
||||
invalid_vote_keys: DashMap<Pubkey, InvalidCacheEntryReason>,
|
||||
should_evict_invalid_entries: bool,
|
||||
current_slot: Slot,
|
||||
) {
|
||||
if invalid_stake_keys.is_empty() && invalid_vote_keys.is_empty() {
|
||||
|
@ -128,16 +127,10 @@ impl StakesCache {
|
|||
|
||||
// Prune invalid stake delegations and vote accounts that were
|
||||
// not properly evicted in normal operation.
|
||||
let mut maybe_stakes = if should_evict_invalid_entries {
|
||||
Some(self.0.write().unwrap())
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let mut stakes = self.0.write().unwrap();
|
||||
|
||||
for (stake_pubkey, reason) in invalid_stake_keys {
|
||||
if let Some(stakes) = maybe_stakes.as_mut() {
|
||||
stakes.remove_stake_delegation(&stake_pubkey);
|
||||
}
|
||||
stakes.remove_stake_delegation(&stake_pubkey);
|
||||
datapoint_warn!(
|
||||
"bank-stake_delegation_accounts-invalid-account",
|
||||
("slot", current_slot as i64, i64),
|
||||
|
@ -147,9 +140,7 @@ impl StakesCache {
|
|||
}
|
||||
|
||||
for (vote_pubkey, reason) in invalid_vote_keys {
|
||||
if let Some(stakes) = maybe_stakes.as_mut() {
|
||||
stakes.remove_vote_account(&vote_pubkey);
|
||||
}
|
||||
stakes.remove_vote_account(&vote_pubkey);
|
||||
datapoint_warn!(
|
||||
"bank-stake_delegation_accounts-invalid-account",
|
||||
("slot", current_slot as i64, i64),
|
||||
|
|
Loading…
Reference in New Issue