From 24e635448d29940ac2f33807ed2e3b31cca9f9b6 Mon Sep 17 00:00:00 2001 From: shenyushi Date: Mon, 6 Jan 2025 15:00:10 +0800 Subject: [PATCH] Fix. --- src/storage/buffer/buffer_obj.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/storage/buffer/buffer_obj.cpp b/src/storage/buffer/buffer_obj.cpp index 346daf52d3..b574f597f5 100644 --- a/src/storage/buffer/buffer_obj.cpp +++ b/src/storage/buffer/buffer_obj.cpp @@ -79,6 +79,7 @@ BufferHandle BufferObj::Load(bool no_mmap) { } if (type_ == BufferType::kMmap) { switch (status_) { + case BufferStatus::kUnloaded: case BufferStatus::kLoaded: { break; } @@ -353,7 +354,7 @@ void BufferObj::UnloadInner() { type_ = BufferType::kMmap; } else if (type_ == BufferType::kMmap) { file_worker_->MmapNotNeed(); - status_ = BufferStatus::kFreed; + status_ = BufferStatus::kUnloaded; } else { buffer_mgr_->PushGCQueue(this); status_ = BufferStatus::kUnloaded;