|
|
@ -107,9 +107,11 @@ void VlogSet::get_value(const struct slot_content &sc, std::string *value) { |
|
|
|
vhandler = get_vlog_handler(vinfo->vlog_num_for_gc); |
|
|
|
} |
|
|
|
vhandler->vlog_latch_.soft_lock(); |
|
|
|
vhandler->incre_access_thread_nums(); // FIXME: increase thread nums
|
|
|
|
mtx.unlock(); // for better performance
|
|
|
|
vinfo->vlog_info_latch_.unlock(); |
|
|
|
read_vlog_value(sc, value); |
|
|
|
vhandler->decre_access_thread_nums(); // FIXME: decrease thread nums
|
|
|
|
vhandler->vlog_latch_.soft_unlock(); |
|
|
|
} |
|
|
|
|
|
|
@ -154,9 +156,11 @@ void VlogSet::put_value(struct slot_content &sc, size_t slot_num, const leveldb: |
|
|
|
} |
|
|
|
|
|
|
|
vhandler->vlog_latch_.hard_lock(); |
|
|
|
vhandler->incre_access_thread_nums(); // FIXME: increase thread nums
|
|
|
|
mtx.unlock(); // for better performance
|
|
|
|
vinfo->vlog_info_latch_.unlock(); |
|
|
|
write_vlog_value(sc, slot_num, value); |
|
|
|
vhandler->decre_access_thread_nums(); // FIXME: decrease thread nums
|
|
|
|
vhandler->vlog_latch_.hard_unlock(); |
|
|
|
} |
|
|
|
|
|
|
@ -171,9 +175,11 @@ void VlogSet::del_value(const struct slot_content &sc) { |
|
|
|
} |
|
|
|
|
|
|
|
vhandler->vlog_latch_.hard_lock(); |
|
|
|
vhandler->decre_access_thread_nums(); // FIXME: increase thread nums
|
|
|
|
mtx.unlock(); // for better performance
|
|
|
|
vinfo->vlog_info_latch_.unlock(); |
|
|
|
mark_del_value(sc); |
|
|
|
vhandler->decre_access_thread_nums(); // FIXME: decrease thread nums
|
|
|
|
vhandler->vlog_latch_.hard_unlock(); |
|
|
|
} |
|
|
|
|
|
|
|