Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
8 changes: 4 additions & 4 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,7 @@ impl SplitAncientStorages {
i += 1;
if treat_as_ancient(storage) {
// even though the slot is in range of being an ancient append vec, if it isn't actually a large append vec,
// then we are better off treating all these slots as normally cachable to reduce work in dedup.
// then we are better off treating all these slots as normally cacheable to reduce work in dedup.
// Since this one is large, for the moment, this one becomes the highest slot where we want to individually cache files.
len_truncate = i;
}
Expand Down Expand Up @@ -5798,7 +5798,7 @@ impl AccountsDb {

/// This should only be called after the `Bank::drop()` runs in bank.rs, See BANK_DROP_SAFETY
/// comment below for more explanation.
/// * `is_serialized_with_abs` - indicates whehter this call runs sequentially with all other
/// * `is_serialized_with_abs` - indicates whether this call runs sequentially with all other
/// accounts_db relevant calls, such as shrinking, purging etc., in account background
/// service.
pub fn purge_slot(&self, slot: Slot, bank_id: BankId, is_serialized_with_abs: bool) {
Expand Down Expand Up @@ -6182,7 +6182,7 @@ impl AccountsDb {
// allocate a buffer on the stack that's big enough
// to hold a token account or a stake account
const META_SIZE: usize = 8 /* lamports */ + 8 /* rent_epoch */ + 1 /* executable */ + 32 /* owner */ + 32 /* pubkey */;
const DATA_SIZE: usize = 200; // stake acounts are 200 B and token accounts are 165-182ish B
const DATA_SIZE: usize = 200; // stake accounts are 200 B and token accounts are 165-182ish B
const BUFFER_SIZE: usize = META_SIZE + DATA_SIZE;
let mut buffer = SmallVec::<[u8; BUFFER_SIZE]>::new();

Expand Down Expand Up @@ -8950,7 +8950,7 @@ impl AccountsDb {
// these write directly to disk, so the more threads, the better
num_cpus::get()
} else {
// seems to be a good hueristic given varying # cpus for in-mem disk index
// seems to be a good heuristic given varying # cpus for in-mem disk index
8
};
let chunk_size = (outer_slots_len / (std::cmp::max(1, threads.saturating_sub(1)))) + 1; // approximately 400k slots in a snapshot
Expand Down
2 changes: 1 addition & 1 deletion accounts-db/src/accounts_db/geyser_plugin_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl AccountsDb {

// later entries in the same slot are more recent and override earlier accounts for the same pubkey
// We can pass an incrementing number here for write_version in the future, if the storage does not have a write_version.
// As long as all accounts for this slot are in 1 append vec that can be itereated olest to newest.
// As long as all accounts for this slot are in 1 append vec that can be iterated olest to newest.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Since you're already in here, wanna fix "olest" to "oldest"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed! good eyes lol

self.notify_filtered_accounts(
slot,
notified_accounts,
Expand Down
2 changes: 1 addition & 1 deletion accounts-db/src/ancient_append_vecs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ impl AncientSlotInfos {
/// remove entries from 'all_infos' such that combining
/// the remaining entries into storages of 'ideal_storage_size'
/// will get us below 'max_storages'
/// The entires that are removed will be reconsidered the next time around.
/// The entries that are removed will be reconsidered the next time around.
/// Combining too many storages costs i/o and cpu so the goal is to find the sweet spot so
/// that we make progress in cleaning/shrinking/combining but that we don't cause unnecessary
/// churn.
Expand Down
2 changes: 1 addition & 1 deletion accounts-db/src/bucket_map_holder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ pub mod tests {
(0..threads).into_par_iter().for_each(|_| {
// This test used to be more strict with time, but in a parallel, multi test environment,
// sometimes threads starve and this test intermittently fails. So, give it more time than it should require.
// This may be aggrevated by the strategy of only allowing thread 0 to advance the age.
// This may be aggravated by the strategy of only allowing thread 0 to advance the age.
while now.elapsed().as_millis() < (time as u128) * 100 {
if test.maybe_advance_age() {
test.bucket_flushed_at_current_age(true);
Expand Down
2 changes: 1 addition & 1 deletion accounts-db/src/buffered_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! calling read(), advance_offset() and set_required_data_len(account_data_len) once the next account
//! data length is known.
//!
//! Unlike BufRead/BufReader, this type guarnatees that on the next read() after calling
//! Unlike BufRead/BufReader, this type guarantees that on the next read() after calling
//! set_required_data_len(len), the whole account data is buffered _linearly_ in memory and available to
//! be returned.
use {
Expand Down