Skip to content

Commit

Permalink
[Opt](load) Optimize the error messages of -235 and -238 for loading (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
liaoxin01 authored Sep 28, 2024
1 parent e84a77b commit b6b8e4f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
6 changes: 4 additions & 2 deletions be/src/cloud/cloud_delete_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ Status CloudDeleteTask::execute(CloudStorageEngine& engine, const TPushReq& requ
LOG_WARNING("tablet exceeds max version num limit")
.tag("limit", config::max_tablet_version_num)
.tag("tablet_id", tablet->tablet_id());
return Status::Error<TOO_MANY_VERSION>("too many versions, versions={} tablet={}",
config::max_tablet_version_num, tablet->tablet_id());
return Status::Error<TOO_MANY_VERSION>(
"too many versions, versions={} tablet={}. Please reduce the frequency of loading "
"data or adjust the max_tablet_version_num in be.conf to a larger value.",
config::max_tablet_version_num, tablet->tablet_id());
}

// check delete condition if push for delete
Expand Down
3 changes: 2 additions & 1 deletion be/src/cloud/cloud_rowset_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ Status CloudRowsetBuilder::check_tablet_version_count() {
if (version_count > config::max_tablet_version_num) {
return Status::Error<TOO_MANY_VERSION>(
"failed to init rowset builder. version count: {}, exceed limit: {}, "
"tablet: {}",
"tablet: {}. Please reduce the frequency of loading data or adjust the "
"max_tablet_version_num in be.conf to a larger value.",
version_count, config::max_tablet_version_num, _tablet->tablet_id());
}
return Status::OK();
Expand Down
7 changes: 5 additions & 2 deletions be/src/olap/push_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ Status PushHandler::_do_streaming_ingestion(TabletSharedPtr tablet, const TPushR
// check if version number exceed limit
if (tablet->exceed_version_limit(config::max_tablet_version_num)) {
return Status::Status::Error<TOO_MANY_VERSION>(
"failed to push data. version count: {}, exceed limit: {}, tablet: {}",
"failed to push data. version count: {}, exceed limit: {}, tablet: {}. Please "
"reduce the frequency of loading data or adjust the max_tablet_version_num in "
"be.conf to a larger value.",
tablet->version_count(), config::max_tablet_version_num, tablet->tablet_id());
}

Expand All @@ -172,7 +174,8 @@ Status PushHandler::_do_streaming_ingestion(TabletSharedPtr tablet, const TPushR
config::tablet_meta_serialize_size_limit) {
return Status::Error<TOO_MANY_VERSION>(
"failed to init rowset builder. meta serialize size : {}, exceed limit: {}, "
"tablet: {}",
"tablet: {}. Please reduce the frequency of loading data or adjust the "
"max_tablet_version_num in be.conf to a larger value.",
tablet->avg_rs_meta_serialize_size() * version_count,
config::tablet_meta_serialize_size_limit, tablet->tablet_id());
}
Expand Down
6 changes: 4 additions & 2 deletions be/src/olap/rowset/beta_rowset_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,8 @@ Status BaseBetaRowsetWriter::_check_segment_number_limit(size_t segnum) {
if (UNLIKELY(segnum > config::max_segment_num_per_rowset)) {
return Status::Error<TOO_MANY_SEGMENTS>(
"too many segments in rowset. tablet_id:{}, rowset_id:{}, max:{}, "
"_num_segment:{}, rowset_num_rows:{}",
"_num_segment:{}, rowset_num_rows:{}. Please check if the bucket number is too "
"small or if the data is skewed.",
_context.tablet_id, _context.rowset_id.to_string(),
config::max_segment_num_per_rowset, _num_segment, get_rowset_num_rows());
}
Expand All @@ -938,7 +939,8 @@ Status BetaRowsetWriter::_check_segment_number_limit(size_t segnum) {
if (UNLIKELY(segnum > config::max_segment_num_per_rowset)) {
return Status::Error<TOO_MANY_SEGMENTS>(
"too many segments in rowset. tablet_id:{}, rowset_id:{}, max:{}, _num_segment:{}, "
"_segcompacted_point:{}, _num_segcompacted:{}, rowset_num_rows:{}",
"_segcompacted_point:{}, _num_segcompacted:{}, rowset_num_rows:{}. Please check if "
"the bucket number is too small or if the data is skewed.",
_context.tablet_id, _context.rowset_id.to_string(),
config::max_segment_num_per_rowset, _num_segment, _segcompacted_point,
_num_segcompacted, get_rowset_num_rows());
Expand Down
6 changes: 4 additions & 2 deletions be/src/olap/rowset_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ Status RowsetBuilder::check_tablet_version_count() {
if (version_count > config::max_tablet_version_num) {
return Status::Error<TOO_MANY_VERSION>(
"failed to init rowset builder. version count: {}, exceed limit: {}, "
"tablet: {}",
"tablet: {}. Please reduce the frequency of loading data or adjust the "
"max_tablet_version_num in be.conf to a larger value.",
version_count, config::max_tablet_version_num, _tablet->tablet_id());
}
return Status::OK();
Expand Down Expand Up @@ -200,7 +201,8 @@ Status RowsetBuilder::init() {
config::tablet_meta_serialize_size_limit) {
return Status::Error<TOO_MANY_VERSION>(
"failed to init rowset builder. meta serialize size : {}, exceed limit: {}, "
"tablet: {}",
"tablet: {}. Please reduce the frequency of loading data or adjust the "
"max_tablet_version_num in be.conf to a larger value.",
tablet()->avg_rs_meta_serialize_size() * version_count,
config::tablet_meta_serialize_size_limit, _tablet->tablet_id());
}
Expand Down

0 comments on commit b6b8e4f

Please sign in to comment.