Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch-3.0: [test](regression)Add index compaction exception case #46118 #46207

Open
wants to merge 1 commit into
base: branch-3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions be/src/olap/compaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,8 @@ void Compaction::mark_skip_index_compaction(
for (auto&& column_uniq_id : context.columns_to_do_index_compaction) {
auto col = _cur_tablet_schema->column_by_uid(column_uniq_id);
const auto* index_meta = _cur_tablet_schema->inverted_index(col);
DBUG_EXECUTE_IF("Compaction::mark_skip_index_compaction_can_not_find_index_meta",
{ index_meta = nullptr; })
if (index_meta == nullptr) {
LOG(WARNING) << "mark skip index compaction, can not find index_meta for column"
<< ". tablet=" << _tablet->tablet_id()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,13 @@ suite("test_index_compaction_failure_injection", "nonConcurrent") {
// tigger full compaction for all tablets with fault injection
try {
GetDebugPoint().enableDebugPointForAllBEs("index_compaction_compact_column_throw_error")
GetDebugPoint().enableDebugPointForAllBEs("Compaction::mark_skip_index_compaction_can_not_find_index_meta")
logger.info("trigger_full_compaction_on_tablets with fault injection: index_compaction_compact_column_throw_error")
trigger_full_compaction_on_tablets.call(tablets)
wait_full_compaction_done.call(tablets)
} finally {
GetDebugPoint().disableDebugPointForAllBEs("index_compaction_compact_column_throw_error")
GetDebugPoint().disableDebugPointForAllBEs("Compaction::mark_skip_index_compaction_can_not_find_index_meta")
}
// after fault injection, there are still 7 rowsets.
rowsetCount = get_rowset_count.call(tablets);
Expand Down Expand Up @@ -257,6 +259,7 @@ suite("test_index_compaction_failure_injection", "nonConcurrent") {
}

boolean invertedIndexCompactionEnable = false
boolean debug_inverted_index_compaction = false
boolean has_update_be_config = false
try {
String backend_id;
Expand All @@ -278,11 +281,17 @@ suite("test_index_compaction_failure_injection", "nonConcurrent") {
disableAutoCompaction = Boolean.parseBoolean(((List<String>) ele)[2])
logger.info("disable_auto_compaction: ${((List<String>) ele)[2]}")
}
if (((List<String>) ele)[0] == "debug_inverted_index_compaction") {
debug_inverted_index_compaction = Boolean.parseBoolean(((List<String>) ele)[2])
logger.info("debug_inverted_index_compaction: ${((List<String>) ele)[2]}")
}
}
set_be_config.call("inverted_index_compaction_enable", "true")
set_be_config.call("debug_inverted_index_compaction", "true")
has_update_be_config = true
// check updated config
check_config.call("inverted_index_compaction_enable", "true");
check_config.call("debug_inverted_index_compaction", "true")


/**
Expand Down Expand Up @@ -343,6 +352,7 @@ suite("test_index_compaction_failure_injection", "nonConcurrent") {
} finally {
if (has_update_be_config) {
set_be_config.call("inverted_index_compaction_enable", invertedIndexCompactionEnable.toString())
set_be_config.call("debug_inverted_index_compaction", debug_inverted_index_compaction.toString())
}
}
}
Loading