Use lazy_rent_collection directly (#22410)

This commit is contained in:
Brooks Prumo 2022-01-10 10:47:08 -06:00 committed by GitHub
parent eeec1ce2ad
commit 9bc2592da1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 9 deletions

View File

@ -4345,7 +4345,7 @@ impl Bank {
}
fn collect_rent_eagerly(&self) {
if !self.enable_eager_rent_collection() {
if self.lazy_rent_collection.load(Relaxed) {
return;
}
@ -4370,14 +4370,6 @@ impl Bank {
self.lazy_rent_collection.store(true, Relaxed);
}
fn enable_eager_rent_collection(&self) -> bool {
if self.lazy_rent_collection.load(Relaxed) {
return false;
}
true
}
fn rent_collection_partitions(&self) -> Vec<Partition> {
if !self.use_fixed_collection_cycle() {
// This mode is for production/development/testing.