Skip to content

Error logging when SegmentMerge task is cancelled by segment invalidation #7502

@JaySon-Huang

Description

@JaySon-Huang

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Notice a WriteBatchesImpl deconstruction error logging

2. What did you expect to see? (Required)

Seems this is a possible routine and we don't need error logging for it. Maybe we can clear the WriteBatches when we check the segment becomes invalidation to avoid this logging?

Anyway, it does not affect the tiflash normally running.

3. What did you see instead (Required)

[2023/05/18 06:45:41.222 +00:00] [DEBUG] [DeltaMergeStore_InternalSegment.cpp:637] ["Segment instance is abandoned, segment=<segment_id=2065428 epoch=5 range=[986649538,986679568) abandoned=true>"] [source="keyspace_id=4294967295 table_id=99"] [thread_id=349]
[2023/05/18 06:45:41.222 +00:00] [DEBUG] [DeltaMergeStore_InternalSegment.cpp:298] ["Merge - Give up segmentMerge because not valid, segment=<segment_id=2065428 epoch=5 range=[986649538,986679568) abandoned=true>"] [source="keyspace_id=4294967295 table_id=99"] [thread_id=349]
[2023/05/18 06:45:44.675 +00:00] [ERROR] [WriteBatchesImpl.h:72] ["!!!=========================Modifications in meta haven't persisted=========================!!! Stack trace: \n       0x1b91a33\tStackTrace::StackTrace() [tiflash+28908083]\n                \tdbms/src/Common/StackTrace.cpp:23\n       0x7243c37\tDB::DM::WriteBatches::~WriteBatches()::'lambda'(DB::WriteBatchWrapper const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::operator()(DB::WriteBatchWrapper const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const [tiflash+119815223]\n                \tdbms/src/Storages/DeltaMerge/WriteBatchesImpl.h:68\n       0x723fe58\tDB::DM::WriteBatches::~WriteBatches() [tiflash+119799384]\n                \tdbms/src/Storages/DeltaMerge/WriteBatchesImpl.h:77\n       0x7267a43\tDB::DM::DeltaMergeStore::segmentMerge(DB::DM::DMContext&, std::__1::vector<std::__1::shared_ptr<DB::DM::Segment>, std::__1::allocator<std::__1::shared_ptr<DB::DM::Segment> > > const&, DB::DM::DeltaMergeStore::SegmentMergeReason) [tiflash+119962179]\n                \tdbms/src/Storages/DeltaMerge/DeltaMergeStore_InternalSegment.cpp:344\n       0x725844d\tDB::DM::DeltaMergeStore::gcTrySegmentMerge(std::__1::shared_ptr<DB::DM::DMContext> const&, std::__1::shared_ptr<DB::DM::Segment> const&) [tiflash+119899213]\n                \tdbms/src/Storages/DeltaMerge/DeltaMergeStore_InternalBg.cpp:683\n       0x725a224\tDB::DM::DeltaMergeStore::onSyncGc(long, DB::DM::GCOptions const&) [tiflash+119906852]\n                \tdbms/src/Storages/DeltaMerge/DeltaMergeStore_InternalBg.cpp:889\n       0x7fcaa9f\tDB::GCManager::work() [tiflash+133999263]\n                \tdbms/src/Storages/GCManager.cpp:105\n       0x7dd647d\tDB::BackgroundProcessingPool::threadFunction(unsigned long) [tiflash+131949693]\n                \tdbms/src/Storages/BackgroundProcessingPool.cpp:234\n       0x7dd6e65\tvoid* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, DB::BackgroundProcessingPool::BackgroundProcessingPool(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_1> >(void*) [tiflash+131952229]\n                \t/usr/local/bin/../include/c++/v1/thread:291\n  0x7f81af0fc609\tstart_thread [libpthread.so.0+34313]\n                \t/build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477\n  0x7f81aef41133\tclone [libc.so.6+1175859]\n                \t/build/glibc-SzIz7B/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95"] [thread_id=349]
[2023/05/18 06:45:44.678 +00:00] [DEBUG] [DeltaMergeStore_InternalSegment.cpp:637] ["Segment instance is abandoned, segment=<segment_id=2065428 epoch=5 range=[986649538,986679568) abandoned=true>"] [source="keyspace_id=4294967295 table_id=99"] [thread_id=349]

4. What is your TiFlash version? (Required)

b8db481

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions