Skip to content

Conversation

@zhannngchen
Copy link
Contributor

@zhannngchen zhannngchen commented Oct 20, 2023

Proposed changes

Issue Number: close #xxx

  1. Fix core, when there is conflict between multiple partial update loads, we need to write updated rows to an additional segment file through a transient rowset writer. The transient rowset writer don't initialize the _mow_context member(and also is unnecessary), [Enhancement](merge-on-write) use delete bitmap to mark delete for rows with delete sign when sequence column doesn't exist #24011 introduce specialized delete mark for rows with delete sign, which caused the following core:
*** Query id: 0-0 ***
*** tablet id: 0 ***
*** Aborted at 1697799372 (unix time) try "date -d @1697799372" if you are using GNU date ***
*** Current BE git commitID: 584111abaf ***
*** SIGSEGV address not mapped to object (@0x18) received by PID 464733 (TID 466003 OR 0x7f03d15f0700) from PID 24; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /mnt/disk2/zhangchen/doris-dev/be/src/common/signal_handler.h:417
 1# 0x00007F058A018570 in /lib64/libc.so.6
 2# doris::segment_v2::SegmentWriter::append_block(doris::vectorized::Block const*, unsigned long, unsigned long) at /mnt/disk2/zhangchen/doris-dev/be/src/olap/rowset/segment_v2/segment_writer.cpp:703
 3# doris::SegmentFlusher::_add_rows(std::unique_ptr<doris::segment_v2::SegmentWriter, std::default_delete<doris::segment_v2::SegmentWriter> >&, doris::vectorized::Block const*, unsigned long, unsigned long) at /mnt/disk2/zhangchen/doris-dev/be/src/olap/rowset/segment_creator.cpp:78
 4# doris::SegmentFlusher::flush_single_block(doris::vectorized::Block const*, int, long*, std::shared_ptr<doris::TabletSchema>) at /mnt/disk2/zhangchen/doris-dev/be/src/olap/rowset/segment_creator.cpp:56
 5# doris::SegmentCreator::flush_single_block(doris::vectorized::Block const*, int, long*, std::shared_ptr<doris::TabletSchema>) at /mnt/disk2/zhangchen/doris-dev/be/src/olap/rowset/segment_creator.cpp:231
 6# doris::BetaRowsetWriter::flush_single_block(doris::vectorized::Block const*) at /mnt/disk2/zhangchen/doris-dev/be/src/olap/rowset/beta_rowset_writer.cpp:457
 7# doris::Tablet::calc_segment_delete_bitmap(std::shared_ptr<doris::Rowset>, std::shared_ptr<doris::segment_v2::Segment> const&, std::vector<std::shared_ptr<doris::Rowset>, std::allocator<std::shared_ptr<doris::Rowset> > > const&, std::shared_ptr<doris::DeleteBitmap>, long, doris::RowsetWriter*) at /mnt/disk2/zhangchen/doris-dev/be/src/olap/tablet.cpp:3105
 8# std::_Function_handler<void (), doris::CalcDeleteBitmapToken::submit(std::shared_ptr<doris::Tablet>, std::shared_ptr<doris::Rowset>, std::shared_ptr<doris::segment_v2::Segment> const&, std::vector<std::shared_ptr<doris::Rowset>, std::allocator<std::shared_ptr<doris::Rowset> > > const&, long, doris::RowsetWriter*)::$_0>::_M_invoke(std::_Any_data const&) at /mnt/disk2/zhangchen/env/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:291
 9# doris::ThreadPool::dispatch_thread() in /mnt/disk2/zhangchen/deploy/be/lib/doris_be
10# doris::Thread::supervise_thread(void*) at /mnt/disk2/zhangchen/doris-dev/be/src/util/thread.cpp:495
11# start_thread at pthread_create.c:480
12# clone at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
  1. A bug in [Enhancement](merge-on-write) use delete bitmap to mark delete for rows with delete sign when sequence column doesn't exist #24011, missed delete mark for new key with delete sign(which not exists in history data)
  2. To fix issue 1, we need to pass the delete bitmap to CalcDeleteBitmapExecutor

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@zhannngchen zhannngchen marked this pull request as ready for review October 23, 2023 03:17
@zhannngchen
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@zhannngchen
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@zhannngchen
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.06% (8305/22411)
Line Coverage: 29.20% (66681/228341)
Region Coverage: 27.81% (34639/124537)
Branch Coverage: 24.43% (17591/72012)
Coverage Report: http://coverage.selectdb-in.cc/coverage/5ef4f87057f23a4b3ec528fe2e6417723afbaefb_5ef4f87057f23a4b3ec528fe2e6417723afbaefb/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.78 seconds
stream load tsv: 576 seconds loaded 74807831229 Bytes, about 123 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 28.9 seconds inserted 10000000 Rows, about 346K ops/s
storage size: 17162300213 Bytes

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.8 seconds
stream load tsv: 573 seconds loaded 74807831229 Bytes, about 124 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.5 seconds inserted 10000000 Rows, about 350K ops/s
storage size: 17162330757 Bytes

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.03% (8297/22409)
Line Coverage: 29.17% (66597/228344)
Region Coverage: 27.79% (34606/124540)
Branch Coverage: 24.41% (17575/72012)
Coverage Report: http://coverage.selectdb-in.cc/coverage/0d4c6c4e2b83091bbbd3c4f88b8a2fa52ee6bb01_0d4c6c4e2b83091bbbd3c4f88b8a2fa52ee6bb01/report/index.html

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

dutyu pushed a commit to dutyu/doris that referenced this pull request Oct 28, 2023
XuJianxu pushed a commit to XuJianxu/doris that referenced this pull request Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants