Skip to content

Commit

Permalink
Add log.
Browse files Browse the repository at this point in the history
  • Loading branch information
small-turtle-1 committed Dec 22, 2023
1 parent ff557e2 commit 8099f66
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/storage/buffer/buffer_obj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ BufferHandle BufferObj::Load() {
case BufferStatus::kFreed: {
buffer_mgr_->RequestSpace(GetBufferSize(), this);
if (type_ != BufferType::kPersistent) {
LOG_WARN(Format("Load kEphemeral spill file {}/{} (Not from this address)", *file_worker_->file_dir_, *file_worker_->file_name_));
LOG_WARN(Format("BufferObj::Load() kEphemeral spill file {}/{} (Not from this address)", *file_worker_->file_dir_, *file_worker_->file_name_));
}
file_worker_->ReadFromFile(type_ != BufferType::kPersistent);
if (type_ == BufferType::kEphemeral) {
Expand Down Expand Up @@ -116,7 +116,7 @@ bool BufferObj::Free() {
break;
}
case BufferType::kEphemeral: {
LOG_WARN(Format("{}: Free kEphemeral.", *file_worker_->file_name_));
LOG_WARN(Format("BufferObj::Free {}/{}: Free kEphemeral.", *file_worker_->file_dir_, *file_worker_->file_name_));
file_worker_->WriteToFile(true);
break;
}
Expand All @@ -142,7 +142,7 @@ bool BufferObj::Save() {
switch (status_) {
case BufferStatus::kLoaded:
case BufferStatus::kUnloaded: {
LOG_WARN(Format("{}/{}: Save kEphemeral.", *file_worker_->file_dir_, *file_worker_->file_name_));
LOG_WARN(Format("BufferObj::Save() {}/{}: Save kEphemeral.", *file_worker_->file_dir_, *file_worker_->file_name_));
file_worker_->WriteToFile(false);
break;
}
Expand All @@ -163,7 +163,7 @@ bool BufferObj::Save() {
void BufferObj::Sync() { file_worker_->Sync(); }

void BufferObj::CloseFile() {
LOG_WARN(Format("BufferObj::Close {}", *file_worker_->file_name_));
LOG_WARN(Format("BufferObj::CloseFile() {}/{}", *file_worker_->file_dir_, *file_worker_->file_name_));
file_worker_->CloseFile();
rw_locker_.unlock();
}
Expand Down

0 comments on commit 8099f66

Please sign in to comment.