fix bug of checkpoint
MODIFY
Main/ghttp.cpp
Main/ghttp.cpp
@@ -3466,7 +3466,18 @@ void checkpoint_thread_new(const shared_ptr<HttpServer::Response>& response,stri
}
else
{
+ pthread_rwlock_rdlock(&txn_m_lock);
+ if (txn_managers.find(db_name) == txn_managers.end())
+ {
+ error = "Database transaction manager error.";
+ sendResponseMsg(1004,error,response);
+ pthread_rwlock_unlock(&txn_m_lock);
+ return;
+ }
+ shared_ptr<Txn_manager> txn_m = txn_managers[db_name];
+ pthread_rwlock_unlock(&txn_m_lock);
+ txn_m->Checkpoint();
current_database->save();
//NOTICE: this info is in header
string success = "Database saved successfully.";

fix bug of checkpoint