Browse Source

fix unnormal size bug

xxy
小人鱼 9 months ago
parent
commit
457a12701a
3 changed files with 10 additions and 9 deletions
  1. +7
    -7
      db/db_impl.cc
  2. BIN
      设计文档.assets/image-20241210005029291.png
  3. +3
    -2
      设计文档.md

+ 7
- 7
db/db_impl.cc View File

@ -1742,14 +1742,14 @@ void DBImpl::GarbageCollect() {
valuelog_set.emplace(filename); valuelog_set.emplace(filename);
} }
} }
//bool tmp_judge=false;//only clean one file
bool tmp_judge=false;//only clean one file
for (std::string valuelog_name : valuelog_set) { for (std::string valuelog_name : valuelog_set) {
// if(tmp_judge){
// break;
// }
// else{
// tmp_judge=true;
// }
if(tmp_judge){
break;
}
else{
tmp_judge=true;
}
uint64_t cur_log_number = GetValueLogID(valuelog_name); uint64_t cur_log_number = GetValueLogID(valuelog_name);
valuelog_name = ValueLogFileName(dbname_, cur_log_number); valuelog_name = ValueLogFileName(dbname_, cur_log_number);
if (cur_log_number == valuelogfile_number_) { if (cur_log_number == valuelogfile_number_) {

BIN
设计文档.assets/image-20241210005029291.png View File

Before After
Width: 853  |  Height: 784  |  Size: 105 KiB

+ 3
- 2
设计文档.md View File

@ -596,7 +596,7 @@ version_2:
version_3: version_3:
![image-20241208233143593](设计文档.assets/image-20241208233143593.png)
![image-20241210005029291](设计文档.assets/image-20241210005029291.png)
## 6. 可能遇到的挑战与解决方案 ## 6. 可能遇到的挑战与解决方案
@ -650,4 +650,5 @@ version_3:
- [ ] 对范围查询做ValueLog预取优化 - [ ] 对范围查询做ValueLog预取优化
- [ ] 对valueLog做压缩优化(?) - [ ] 对valueLog做压缩优化(?)
- [ ] 实现key-only scan(便利用户,一些场景无需找value) - [ ] 实现key-only scan(便利用户,一些场景无需找value)
- [ ] 实现YCSB benchmark测试
- [ ] 实现YCSB benchmark测试
- [ ] 使用内存表或者元数据表做valueLog空洞率记录

Loading…
Cancel
Save