[Bug] segcompaction coredump when adding key column
- Dominant language
- Java
- Stars
- 15.9k
- Forks
- 3.9k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 520
Description
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
### Version
3.0
### What's Wrong?
segcompaction coredump when adding key column , Similar issue #56431
`CREATE TABLE IF NOT EXISTS visituri_detail_bydate
(
`stat_date` DATE NOT NULL,
`lib` VARCHAR(50),
`project_name` VARCHAR(100),
`uri` VARCHAR(500),
`uri_path` VARCHAR(500),
`host` VARCHAR(255),
`title` VARCHAR(500),
`country` VARCHAR(50),
`province` VARCHAR(50),
`is_first_day` VARCHAR(10),
`pv` BIGINT,
`visit_count` BIGINT,
`uv` BIGINT,
`new_uv` BIGINT,
`ip_count` BIGINT,
`visit_time` LARGEINT,
`bounce_count` BIGINT,
`entry_count` BIGINT,
`exit_count` BIGINT,
`down_pv_count` BIGINT,
`update_time` DATETIME
) UNIQUE KEY(`stat_date`, `lib`, `project_name`, `uri`, `uri_path`, `host`,`title`, `country`, `province`, `is_first_day`)
PARTITION BY RANGE(`stat_date`)()
DISTRIBUTED BY HASH(`uri`) BUCKETS 10
PROPERTIES (
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "MONTH",
"dynamic_partition.start" = "-36",
"dynamic_partition.end" = "1",
"dynamic_partition.prefix" = "p",
"function_column.sequence_col" = "update_time"
);
ALTER TABLE visituri_detail_bydate ADD COLUMN shop_id VARCHAR(50) KEY DEFAULT 'N/A' AFTER is_first_day;
*** Aborted at 1773734063 (unix time) try "date -d @1773734063" if you are using GNU date ***
*** Current BE git commitID: 4a4c653eaf ***
*** SIGSEGV address not mapped to object (@0x40) received by PID 4068046 (TID 4069097 OR 0x7f19195e5640) from PID 64; stack trace: ***
0# 0x000055C8F985341E in /opt/cloud/doris/be/lib/doris_be
1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /var/rds/jre-17.0.12/lib/server/libjvm.so
2# JVM_handle_linux_signal in /var/rds/jre-17.0.12/lib/server/libjvm.so
3# 0x00007F1B901CC1F0 in /usr/lib64/libc.so.6
4# doris::SegcompactionWorker::_do_compact_segments(std::shared_ptr, std::allocator > > >) in /opt/cloud/doris/be/lib/doris_be
5# doris::SegcompactionWorker::compact_segments(std::shared_ptr, std::allocator > > >) in /opt/cloud/doris/be/lib/doris_be
6# doris::StorageEngine::_handle_seg_compaction(std::shared_ptr, std::shared_ptr, std::allocator > > >, unsigned long) in /opt/cloud/doris/be/lib/doris_be
7# doris::Status std::__invoke_impl, std::shared_ptr, std::allocator > > >, unsigned long), doris::StorageEngine*&, std::shared_ptr&, std::shared_ptr, std::allocator > > >&, unsigned long&>(std::__invoke_memfun_deref, doris::Status (doris::StorageEngine::*&)(std::shared_ptr, std::shared_ptr, std::allocator > > >, unsigned long), doris::StorageEngine*&, std::shared_ptr&, std::shared_ptr, std::allocator > > >&, unsigned long&) in /opt/cloud/doris/be/lib/doris_be
8# std::_Function_handler, std::shared_ptr, std::allocator > > >, unsigned long))(std::shared_ptr, std::shared_ptr, std::allocator > > >, unsigned long)> >::_M_invoke(std::_Any_data const&) in /opt/cloud/doris/be/lib/doris_be
9# doris::ThreadPool::dispatch_thread() in /opt/cloud/doris/be/lib/doris_be
10# doris::Thread::supervise_thread(void*) in /opt/cloud/doris/be/lib/doris_be
`
### What You Expected?
fix issues to avoid BE crash, segcompaction for this RowsetWriter, only enabled when importing data
### How to Reproduce?
_No response_
### Anything Else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
Contributor guide
Assessment
This issue has not been assessed yet.