gavinchou commented on PR #68322: URL: https://github.com/apache/doris/pull/68322#issuecomment-5921682855
### Major: preserve cleanup ownership for abandoned WRITE_ONLY creates This remains unresolved at head `0c596d0305b15c93e5ba5dada50d63f8ce7a586c`. `create_tablets` writes versioned tablet metadata, load/compact stats, and forward/inverted indexes whenever versioned writes are enabled, including `MULTI_VERSION_WRITE_ONLY`. However, `should_recycle_versioned_keys()` returns false in WRITE_ONLY while the snapshot switch is absent or disabled, and this PR now uses that predicate to gate the entire versioned-tablet cleanup in `recycle_tablets()`. If FE stops after `prepare_*` and `create_tablets` but before `commit_*`, the expired PREPARED marker is eventually recycled. The recycler deletes the legacy tablet keys and then removes the outer recycle marker, while the versioned metadata, stats, and indexes remain. No durable owner is left to retry their cleanup. Once versioned reads are enabled, the retained forward index plus metadata can expose a stale tablet identity. The previous `is_multi_version` gate still removed versioned tablet metadata and stats in this state, so replacing it with `should_recycle_versioned_keys()` regresses that cleanup. Please separate “this state may have written versioned keys” from “global versioned-key recycling is allowed”, retain a durable marker until all keys written for the object are reclaimed, and add a fail-before/pass-after test for `PREPARED + WRITE_ONLY + snapshot disabled`. This is the same unresolved issue discussed in the inline review: https://github.com/apache/doris/pull/68322#discussion_r4081619212 -- 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]
