Skip to content

Commit

Permalink
[fixbug]fix bug for OLAP_SUCCESS with Status (apache#9427)
Browse files Browse the repository at this point in the history
  • Loading branch information
pengxiangyu authored and starocean999 committed May 19, 2022
1 parent c145269 commit 253ca85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions be/src/olap/storage_migration_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,10 @@ Status StorageMigrationV2Handler::_convert_historical_rowsets(
goto PROCESS_ALTER_EXIT;
}

if ((res = _generate_rowset_writer(sm_params.base_tablet->tablet_path_desc(),
sm_params.new_tablet->tablet_path_desc(), rs_reader,
rowset_writer.get(), new_tablet)) != OLAP_SUCCESS) {
if (!(res = _generate_rowset_writer(sm_params.base_tablet->tablet_path_desc(),
sm_params.new_tablet->tablet_path_desc(), rs_reader,
rowset_writer.get(), new_tablet))
.ok()) {
LOG(WARNING) << "failed to add_rowset. version=" << rs_reader->version().first << "-"
<< rs_reader->version().second;
new_tablet->data_dir()->remove_pending_ids(ROWSET_ID_PREFIX +
Expand Down
5 changes: 3 additions & 2 deletions be/src/olap/tablet_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1070,8 +1070,9 @@ void TabletManager::try_delete_unused_tablet_path(DataDir* data_dir, TTabletId t
if (!tablet_uid.empty() && !storage_name.empty()) {
segment_desc.storage_name = storage_name;
StorageParamPB storage_param;
if (StorageBackendMgr::instance()->get_storage_param(
storage_name, &storage_param) != OLAP_SUCCESS) {
if (!StorageBackendMgr::instance()
->get_storage_param(storage_name, &storage_param)
.ok()) {
LOG(WARNING) << "storage_name is invalid: " << storage_name;
return;
}
Expand Down

0 comments on commit 253ca85

Please sign in to comment.