kkli08 / KV-Store

Key-Value Storage Database
MIT License
1 stars 0 forks source link

KVDB ReOpen issue SIGSEGV #45

Closed kkli08 closed 2 weeks ago

kkli08 commented 2 weeks ago
TEST(APITest, reOpen) {
    API* api = new API();
    std::string db_name = "test_db_reopen";
    api->Open(db_name);
    api->Close();
    api->Open(db_name);
    api->Close();
}
Running main() from ~/KV-Store/cmake-build-debug/_deps/googletest-src/googletest/src/gtest_main.cc
Opening database test_db_reopen
Created database directory: test_db_reopen
API::set_path()-->> Created new Index.sst file at: "test_db_reopen/Index.sst"
Closing database 
Cleanup completed.
Opening database test_db_reopen
Existed database directory: test_db_reopen
Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)
kkli08 commented 2 weeks ago

https://github.com/kkli08/KV-Store/blob/main/api/api.cpp#L23-L29