Skip to content

Commit

Permalink
format the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Lchangliang committed Jul 25, 2022
1 parent c49d78a commit ee3dcb1
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion be/src/olap/compaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ Status Compaction::do_compaction_impl(int64_t permits) {
std::vector<RowsetMetaSharedPtr> rowset_metas(_input_rowsets.size());
std::transform(_input_rowsets.begin(), _input_rowsets.end(), rowset_metas.begin(),
[](const RowsetSharedPtr& rowset) { return rowset->rowset_meta(); });
TabletSchemaSPtr cur_tablet_schema = _tablet->rowset_meta_with_max_schema_version(rowset_metas)->tablet_schema();
TabletSchemaSPtr cur_tablet_schema =
_tablet->rowset_meta_with_max_schema_version(rowset_metas)->tablet_schema();

RETURN_NOT_OK(construct_output_rowset_writer(cur_tablet_schema.get()));
RETURN_NOT_OK(construct_input_rowset_readers());
Expand Down
3 changes: 2 additions & 1 deletion be/src/olap/delta_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ Status DeltaWriter::init() {
_req.txn_id, _req.load_id));
}
// build tablet schema in request level
_build_current_tablet_schema(_req.index_id, _req.ptable_schema_param, *_tablet->tablet_schema());
_build_current_tablet_schema(_req.index_id, _req.ptable_schema_param,
*_tablet->tablet_schema());

RETURN_NOT_OK(_tablet->create_rowset_writer(_req.txn_id, _req.load_id, PREPARED, OVERLAPPING,
_tablet_schema.get(), &_rowset_writer));
Expand Down
7 changes: 4 additions & 3 deletions be/src/olap/schema_change.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,8 @@ bool SchemaChangeWithSorting::_external_sorting(vector<RowsetSharedPtr>& src_row
}
// get cur schema if rowset schema exist, rowset schema must be newer than tablet schema
auto max_version_rowset = src_rowsets.back();
const TabletSchema* cur_tablet_schema = max_version_rowset->rowset_meta()->tablet_schema().get();
const TabletSchema* cur_tablet_schema =
max_version_rowset->rowset_meta()->tablet_schema().get();
if (cur_tablet_schema == nullptr) {
cur_tablet_schema = new_tablet->tablet_schema().get();
}
Expand Down Expand Up @@ -1721,8 +1722,8 @@ Status VSchemaChangeWithSorting::_external_sorting(vector<RowsetSharedPtr>& src_

Merger::Statistics stats;
RETURN_IF_ERROR(Merger::vmerge_rowsets(new_tablet, READER_ALTER_TABLE,
new_tablet->tablet_schema().get(), rs_readers, rowset_writer,
&stats));
new_tablet->tablet_schema().get(), rs_readers,
rowset_writer, &stats));

_add_merged_rows(stats.merged_rows);
_add_filtered_rows(stats.filtered_rows);
Expand Down
5 changes: 3 additions & 2 deletions be/src/olap/snapshot_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ Status SnapshotManager::_rename_rowset_id(const RowsetMetaPB& rs_meta_pb,
context.tablet_schema_hash = org_rowset_meta->tablet_schema_hash();
context.rowset_type = org_rowset_meta->rowset_type();
context.tablet_path = new_tablet_path;
context.tablet_schema =
org_rowset_meta->tablet_schema() ? org_rowset_meta->tablet_schema().get() : &tablet_schema;
context.tablet_schema = org_rowset_meta->tablet_schema()
? org_rowset_meta->tablet_schema().get()
: &tablet_schema;
context.rowset_state = org_rowset_meta->rowset_state();
context.version = org_rowset_meta->version();
context.oldest_write_timestamp = org_rowset_meta->oldest_write_timestamp();
Expand Down
3 changes: 2 additions & 1 deletion be/src/olap/tablet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1730,7 +1730,8 @@ Status Tablet::cooldown() {
new_rowset_meta->set_fs(dest_fs);
new_rowset_meta->set_creation_time(time(nullptr));
RowsetSharedPtr new_rowset;
RowsetFactory::create_rowset(_schema.get(), _tablet_path, std::move(new_rowset_meta), &new_rowset);
RowsetFactory::create_rowset(_schema.get(), _tablet_path, std::move(new_rowset_meta),
&new_rowset);

std::vector to_add {std::move(new_rowset)};
std::vector to_delete {std::move(old_rowset)};
Expand Down
4 changes: 2 additions & 2 deletions be/src/service/doris_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@ int main(int argc, char** argv) {
}

#ifdef LIBJVM
// 6. init jni
status = doris::JniUtil::Init();
// 6. init jni
status = doris::JniUtil::Init();
if (!status.ok()) {
LOG(WARNING) << "Failed to initialize JNI: " << status.get_error_msg();
doris::shutdown_logging();
Expand Down

0 comments on commit ee3dcb1

Please sign in to comment.