mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-01 16:35:29 +08:00
fix(db): no transaction for update_group_file
Former-commit-id: 22b364f8f07cd009391952ba66478879f6b86b6d
This commit is contained in:
parent
d6dc77ced2
commit
5569f22de2
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user