From 5569f22de28dd5262420b4f706cf0fa95ca17284 Mon Sep 17 00:00:00 2001 From: Xu Peng Date: Sun, 28 Apr 2019 20:57:42 +0800 Subject: [PATCH] fix(db): no transaction for update_group_file Former-commit-id: 22b364f8f07cd009391952ba66478879f6b86b6d --- cpp/src/db/DBMetaImpl.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cpp/src/db/DBMetaImpl.cpp b/cpp/src/db/DBMetaImpl.cpp index e8ccfaba3c..38295974ea 100644 --- a/cpp/src/db/DBMetaImpl.cpp +++ b/cpp/src/db/DBMetaImpl.cpp @@ -368,13 +368,14 @@ Status DBMetaImpl::get_group_files(const std::string& group_id_, Status DBMetaImpl::update_group_file(GroupFileSchema& group_file) { group_file.updated_time = GetMicroSecTimeStamp(); try { - auto commited = ConnectorPtr->transaction([&] () mutable { - ConnectorPtr->update(group_file); - return true; - }); - if (!commited) { - return Status::DBTransactionError("Update file Error"); - } + ConnectorPtr->update(group_file); + /* auto commited = ConnectorPtr->transaction([&] () mutable { */ + /* ConnectorPtr->update(group_file); */ + /* return true; */ + /* }); */ + /* if (!commited) { */ + /* return Status::DBTransactionError("Update file Error"); */ + /* } */ } catch (std::exception & e) { LOG(DEBUG) << e.what(); LOG(DEBUG) << "id= " << group_file.id << " file_id=" << group_file.file_id;