Skip to content

Commit

Permalink
log when appending exceeds available space (solana-labs#34170)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored Nov 20, 2023
1 parent 3368579 commit 2024638
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6310,6 +6310,14 @@ impl AccountsDb {
.unwrap_or_default();
let data_len = (data_len + STORE_META_OVERHEAD) as u64;
if !self.has_space_available(slot, data_len) {
info!(
"write_accounts_to_storage, no space: {}, {}, {}, {}, {}",
storage.accounts.capacity(),
storage.accounts.remaining_bytes(),
data_len,
infos.len(),
accounts_and_meta_to_store.len()
);
let special_store_size = std::cmp::max(data_len * 2, self.file_size);
if self
.try_recycle_and_insert_store(slot, special_store_size, std::u64::MAX)
Expand Down

0 comments on commit 2024638

Please sign in to comment.