Skip to content

Conversation

@airborne12
Copy link
Member

pick #47562 #50056 from master

airborne12 and others added 2 commits May 9, 2025 10:33
Problem Summary:
fix DCHECK error after multiple add/drop rename column when building
inverted index

```
F20250408 11:43:45.886974 1066024 index_builder.cpp:423] Check failed: output_rowset_schema->has_inverted_index_with_index_id(index_id) 
*** Check failure stack trace: ***
F20250408 11:43:45.886988 1066022 index_builder.cpp:423] Check failed: output_rowset_schema->has_inverted_index_with_index_id(index_id) 
*** Check failure stack trace: ***
    @     0x590b0f234d26  google::LogMessage::SendToLog()
    @     0x590b0f234d26  google::LogMessage::SendToLog()
    @     0x590b0f231770  google::LogMessage::Flush()
    @     0x590b0f231770  google::LogMessage::Flush()
    @     0x590b0f235569  google::LogMessageFatal::~LogMessageFatal()
    @     0x590b0f235569  google::LogMessageFatal::~LogMessageFatal()
    @     0x590ad85d3459  doris::IndexBuilder::handle_single_rowset()
    @     0x590ad85daf25  doris::IndexBuilder::handle_inverted_index_data()
    @     0x590ad85d3459  doris::IndexBuilder::handle_single_rowset()
    @     0x590ad85ddc31  doris::IndexBuilder::do_build_inverted_index()
    @     0x590ad85daf25  doris::IndexBuilder::handle_inverted_index_data()
    @     0x590ad711ad86  doris::StorageEngine::_handle_index_change()
    @     0x590ad85ddc31  doris::IndexBuilder::do_build_inverted_index()
    @     0x590ad711a1da  doris::StorageEngine::process_index_change_task()
    @     0x590ad711ad86  doris::StorageEngine::_handle_index_change()
    @     0x590ad857b89d  doris::EngineIndexChangeTask::execute()
    @     0x590ad711a1da  doris::StorageEngine::process_index_change_task()
    @     0x590ad49deea2  doris::alter_inverted_index_callback()
    @     0x590ad4a1de9d  _ZNSt17_Function_handlerIFvvEZZN5doris14TaskWorkerPool11submit_taskERKNS1_17TAgentTaskRequestEENK3$_0clIS5_EEDaOT_EUlvE_E9_M_invokeERKSt9_Any_data
    @     0x590ad857b89d  doris::EngineIndexChangeTask::execute()
    @     0x590ad936128b  doris::ThreadPool::dispatch_thread()
    @     0x590ad49deea2  doris::alter_inverted_index_callback()
    @     0x590ad4a1de9d  _ZNSt17_Function_handlerIFvvEZZN5doris14TaskWorkerPool11submit_taskERKNS1_17TAgentTaskRequestEENK3$_0clIS5_EEDaOT_EUlvE_E9_M_invokeERKSt9_Any_data
    @     0x590ad9337828  doris::Thread::supervise_thread()
    @     0x740bd7c9caa4  (unknown)
    @     0x740bd7d29c3c  (unknown)
    @              (nil)  (unknown)
*** Query id: 0-0 ***
*** is nereids: 0 ***
*** tablet id: 0 ***
*** Aborted at 1744083830 (unix time) try "date -d @1744083830" if you are using GNU date ***
*** Current BE git commitID: 3640f6c ***
*** SIGABRT unknown detail explain (@0x10417b) received by PID 1065339 (TID 1066024 OR 0x7408c42006c0) from PID 1065339; stack trace: ***
    @     0x590ad936128b  doris::ThreadPool::dispatch_thread()
    @     0x590ad9337828  doris::Thread::supervise_thread()
    @     0x740bd7c9caa4  (unknown)
    @     0x740bd7d29c3c  (unknown)
    @              (nil)  (unknown)
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_master/doris/be/src/common/signal_handler.h:421
 1# 0x0000740BD7C45330 in /lib/x86_64-linux-gnu/libc.so.6
 2# pthread_kill in /lib/x86_64-linux-gnu/libc.so.6
 3# gsignal in /lib/x86_64-linux-gnu/libc.so.6
 4# abort in /lib/x86_64-linux-gnu/libc.so.6
 5# 0x0000590B0F23F5FD in /root/wyx/doris/be/lib/doris_be
 6# 0x0000590B0F231C3A in /root/wyx/doris/be/lib/doris_be
 7# google::LogMessage::SendToLog() in /root/wyx/doris/be/lib/doris_be
 8# google::LogMessage::Flush() in /root/wyx/doris/be/lib/doris_be
 9# google::LogMessageFatal::~LogMessageFatal() in /root/wyx/doris/be/lib/doris_be
10# doris::IndexBuilder::handle_single_rowset(std::shared_ptr<doris::RowsetMeta>, std::vector<std::shared_ptr<doris::segment_v2::Segment>, std::allocator<std::shared_ptr<doris::segment_v2::Segment> > >&) at /home/zcp/repo_center/doris_master/doris/be/src/olap/task/index_builder.cpp:423
11# doris::IndexBuilder::handle_inverted_index_data() at /home/zcp/repo_center/doris_master/doris/be/src/olap/task/index_builder.cpp:711
12# doris::IndexBuilder::do_build_inverted_index() in /root/wyx/doris/be/lib/doris_be
13# doris::StorageEngine::_handle_index_change(std::shared_ptr<doris::IndexBuilder>) at /home/zcp/repo_center/doris_master/doris/be/src/olap/olap_server.cpp:1213
14# doris::StorageEngine::process_index_change_task(doris::TAlterInvertedIndexReq const&) at /home/zcp/repo_center/doris_master/doris/be/src/olap/olap_server.cpp:1207
15# doris::EngineIndexChangeTask::execute() in /root/wyx/doris/be/lib/doris_be
16# doris::alter_inverted_index_callback(doris::StorageEngine&, doris::TAgentTaskRequest const&) in /root/wyx/doris/be/lib/doris_be
17# std::_Function_handler<void (), doris::TaskWorkerPool::submit_task(doris::TAgentTaskRequest const&)::$_0::operator()<doris::TAgentTaskRequest const&>(doris::TAgentTaskRequest const&) const::{lambda()#1}>::_M_invoke(std::_Any_data const&) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:291
18# doris::ThreadPool::dispatch_thread() in /root/wyx/doris/be/lib/doris_be
19# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_master/doris/be/src/util/thread.cpp:497
20# 0x0000740BD7C9CAA4 in /lib/x86_64-linux-gnu/libc.so.6
21# 0x0000740BD7D29C3C in /lib/x86_64-linux-gnu/libc.so.6
```
…47562)

Problem Summary:

This pull request introduces a new method to check for the existence of
a column by its unique ID in the `TabletSchema` class and utilizes this
method in the compaction process to improve error handling and logging.
@airborne12 airborne12 requested a review from yiguolei as a code owner May 9, 2025 02:49
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@airborne12
Copy link
Member Author

run buildall

@airborne12
Copy link
Member Author

run buildall

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 66.67% (8/12) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 38.91% (10291/26446)
Line Coverage 29.96% (85494/285375)
Region Coverage 28.62% (44090/154040)
Branch Coverage 25.37% (22574/88974)

@yiguolei yiguolei merged commit 0002500 into apache:branch-2.1 May 9, 2025
19 of 20 checks passed
@airborne12 airborne12 deleted the pick-50056 branch May 9, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants