foxtail463 opened a new pull request, #67384: URL: https://github.com/apache/doris/pull/67384
Problem Summary: Group memtable flush stores a raw RowsetWriterContext* in SharedMemtable only to remove the segment’s allocated LSNs during teardown. A queued group flush task can retain SharedMemtable after FlushToken has released its GroupRowsetWriter and context, causing the later cleanup to dereference a freed context and crash the BE under ASan. Solution: Make SharedMemtable own the specific resource required for cleanup—the shared allocated-LSN map—rather than borrow the enclosing writer context. Capture the map only when the group writer requires allocated LSNs and assert that the map exists under that invariant. Both insertion during memtable conversion and removal during SharedMemtable teardown now operate directly on the retained map, so delayed task destruction remains safe after writer-context teardown. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
