Skip to content

Commit

Permalink
do check
Browse files Browse the repository at this point in the history
  • Loading branch information
oker authored and oker committed Nov 1, 2024
1 parent de953a9 commit a14a15b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 10 additions & 4 deletions crypto/vm/db/DynamicBagOfCellsDb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,13 +716,17 @@ class DynamicBagOfCellsDbImpl : public DynamicBagOfCellsDb, private ExtCellCreat
return;
}
++pca_state_->active_load_;
LOG(INFO) << "yus pca_load_from_db 0: " << info->info->cell->get_hash().to_hex();
if (info != nullptr && info->info != nullptr && !(info->info->cell.is_null())) {
LOG(INFO) << "yus pca_load_from_db 0: " << info->info->cell->get_hash().to_hex();
}

pca_state_->executor_->execute_async(
[db = this, info, executor = pca_state_->executor_, loader = *loader_]() mutable {
auto res = loader.load_refcnt(info->info->cell->get_hash().as_slice()).move_as_ok();
LOG(INFO) << "yus pca_load_from_db 1: " << info->info->cell->get_hash().to_hex() << " " << res.refcnt();
LOG(INFO) << "yus pca_load_from_db 1: " << info->info->cell->get_hash().to_hex() << " ";
executor->execute_sync([db, info, res = std::move(res)]() {
LOG(INFO) << "yus pca_load_from_db 2: active_load_" << db->pca_state_->active_load_;
LOG(INFO) << "yus pca_load_from_db 2: active_load_ " << db->pca_state_->active_load_ << " "
<< " hash " << info->info->cell->get_hash().to_hex();
--db->pca_state_->active_load_;
db->pca_process_load_queue();
db->pca_set_in_db(info, std::move(res));
Expand All @@ -739,7 +743,9 @@ class DynamicBagOfCellsDbImpl : public DynamicBagOfCellsDb, private ExtCellCreat
}

void pca_set_in_db(PrepareCommitAsyncState::CellInfo2 *info, CellLoader::LoadResult result) {
LOG(INFO) << " yus pca_set_in_db: " << info->info->cell->get_hash().to_hex();
if (info != nullptr && info->info != nullptr && !(info->info->cell.is_null())) {
LOG(INFO) << " yus pca_set_in_db: " << info->info->cell->get_hash().to_hex();
}
info->info->sync_with_db = true;
if (result.status == CellLoader::LoadResult::Ok) {
info->info->in_db = true;
Expand Down
4 changes: 3 additions & 1 deletion validator/db/celldb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,9 @@ void CellDbIn::gc_cont2(BlockHandle handle) {
auto cell = boc_->load_cell(F.root_hash.as_slice()).move_as_ok();

boc_->dec(cell);
LOG(INFO) << "yus GC " << handle->id().to_str() << " " << cell->get_hash().to_hex();
if (!cell.is_null() && !handle) {
LOG(INFO) << "yus GC " << handle->id().to_str() << " " << cell->get_hash().to_hex();
}
db_busy_ = true;
boc_->prepare_commit_async(
async_executor, [this, SelfId = actor_id(this), timer_boc = std::move(timer_boc), F = std::move(F), key_hash,
Expand Down

0 comments on commit a14a15b

Please sign in to comment.