Skip to content

Commit a3f948e

Browse files
committed
Better log for "file not in db"
1 parent 5d27d05 commit a3f948e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

validator/db/archive-manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void ArchiveManager::get_temp_file_short_cont(FileReference ref_id, PackageId id
269269
td::Promise<td::BufferSlice> promise) {
270270
auto f = get_temp_file_desc_by_idx(idx);
271271
if (!f) {
272-
promise.set_error(td::Status::Error(ErrorCode::notready, "file not in db"));
272+
promise.set_error(td::Status::Error(ErrorCode::notready, PSTRING() << "file not in db: " << ref_id.filename()));
273273
return;
274274
}
275275
auto P = td::PromiseCreator::lambda([SelfId = actor_id(this), ref_id, idx = get_prev_temp_file_desc_idx(idx),

validator/db/archive-slice.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,8 @@ void ArchiveSlice::get_file(ConstBlockHandle handle, FileReference ref_id, td::P
385385
auto R = kv_->get(ref_id.hash().to_hex(), value);
386386
R.ensure();
387387
if (R.move_as_ok() == td::KeyValue::GetStatus::NotFound) {
388-
promise.set_error(td::Status::Error(ErrorCode::notready, "file not in archive slice"));
388+
promise.set_error(td::Status::Error(
389+
ErrorCode::notready, PSTRING() << "file " << ref_id.filename() << " not in archive slice " << get_name()));
389390
return;
390391
}
391392
auto offset = td::to_integer<td::uint64>(value);

0 commit comments

Comments
 (0)