Skip to content

Commit

Permalink
fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
mymeiyi committed Sep 26, 2024
1 parent 388dfa9 commit d1f1ad4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
3 changes: 1 addition & 2 deletions be/src/cloud/cloud_tablet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ Status CloudTablet::capture_sub_txn_rs_readers(int64_t version,
auto res = rowset->create_reader(&rs_reader);
if (!res.ok()) {
return Status::Error<ErrorCode::CAPTURE_ROWSET_READER_ERROR>(
"failed to create reader for rowset:{}",
rowset->rowset_id().to_string());
"failed to create reader for rowset:{}", rowset->rowset_id().to_string());
}
rs_splits->emplace_back(std::move(rs_reader));
}
Expand Down
3 changes: 2 additions & 1 deletion be/src/olap/base_tablet.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ class BaseTablet {
std::vector<RowSetSplits>* rs_splits,
bool skip_missing_version) = 0;

virtual Status capture_sub_txn_rs_readers(int64_t version, const std::vector<int64_t>& sub_txn_ids,
virtual Status capture_sub_txn_rs_readers(int64_t version,
const std::vector<int64_t>& sub_txn_ids,
std::vector<RowSetSplits>* rs_splits) = 0;

virtual size_t tablet_footprint() = 0;
Expand Down
3 changes: 2 additions & 1 deletion be/src/olap/parallel_scanner_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ Status ParallelScannerBuilder::_load() {
const auto tablet_id = tablet->tablet_id();
auto& read_source = _all_read_sources[tablet_id];
if (sub_txn_ids.empty()) {
RETURN_IF_ERROR(tablet->capture_rs_readers({0, version}, &read_source.rs_splits, false));
RETURN_IF_ERROR(
tablet->capture_rs_readers({0, version}, &read_source.rs_splits, false));
} else {
if (version > 0) {
RETURN_IF_ERROR(
Expand Down
7 changes: 3 additions & 4 deletions be/src/olap/tablet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,8 @@ Status Tablet::capture_sub_txn_rs_readers(int64_t version, const std::vector<int
<< ", sub_txn_ids.size=" << sub_txn_ids.size();
for (int i = 0; i < sub_txn_ids.size(); ++i) {
auto sub_txn_id = sub_txn_ids[i];
auto rowset = _engine.txn_manager()->get_tablet_rowset(
tablet_id(), tablet_uid(), partition_id(), sub_txn_id);
auto rowset = _engine.txn_manager()->get_tablet_rowset(tablet_id(), tablet_uid(),
partition_id(), sub_txn_id);
DCHECK(rowset != nullptr) << " rowset is nullptr for sub_txn_id=" << sub_txn_ids[i]
<< ", partition_id=" << partition_id()
<< ", tablet=" << tablet_id();
Expand All @@ -958,8 +958,7 @@ Status Tablet::capture_sub_txn_rs_readers(int64_t version, const std::vector<int
auto res = rowset->create_reader(&rs_reader);
if (!res.ok()) {
return Status::Error<ErrorCode::CAPTURE_ROWSET_READER_ERROR>(
"failed to create reader for rowset:{}",
rowset->rowset_id().to_string());
"failed to create reader for rowset:{}", rowset->rowset_id().to_string());
}
rs_splits->emplace_back(std::move(rs_reader));
}
Expand Down
3 changes: 1 addition & 2 deletions be/src/olap/txn_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,7 @@ void TxnManager::get_all_related_tablets(std::set<TabletInfo>* tablet_infos) {
}

RowsetSharedPtr TxnManager::get_tablet_rowset(TTabletId tablet_id, TabletUid tablet_uid,
int64_t partition_id,
TTransactionId transaction_id) {
int64_t partition_id, TTransactionId transaction_id) {
pair<int64_t, int64_t> key(partition_id, transaction_id);
std::shared_lock txn_rdlock(_get_txn_map_lock(transaction_id));
txn_tablet_map_t& txn_tablet_map = _get_txn_tablet_map(transaction_id);
Expand Down
3 changes: 1 addition & 2 deletions cloud/src/meta-service/meta_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1502,8 +1502,7 @@ void MetaServiceImpl::get_tmp_rowset(::google::protobuf::RpcController* controll
it != version_to_schema.end()) {
rowset_meta->mutable_tablet_schema()->CopyFrom(*it->second);
} else {
auto key = meta_schema_key(
{instance_id, index_id, rowset_meta->schema_version()});
auto key = meta_schema_key({instance_id, index_id, rowset_meta->schema_version()});
if (!try_fetch_and_parse_schema(txn.get(), *rowset_meta, key, code, msg)) {
return;
}
Expand Down

0 comments on commit d1f1ad4

Please sign in to comment.