hello-stephen commented on code in PR #71217:
URL: https://github.com/apache/doris/pull/71217#discussion_r4763869576
##########
be/src/storage/tablet/tablet.h:
##########
@@ -582,6 +586,9 @@ class Tablet final : public BaseTablet {
std::mutex _cumulative_compaction_lock;
std::shared_timed_mutex _migration_lock;
std::mutex _build_inverted_index_lock;
+ // Index id to the newest index change job that has run on it, in memory
only.
+ // Guarded by _build_inverted_index_lock.
+ std::unordered_map<int64_t, int64_t> _index_change_job_ids;
Review Comment:
[P1] Preserve the fence when disk migration replaces the tablet
`EngineStorageMigrationTask::_reload_tablet()` calls
`TabletManager::load_tablet_from_dir()`, whose `load_tablet_from_meta()`
constructs a fresh `Tablet`; this map is neither transferred nor restored. A
sender can convert DROP job 10 before cancellation, pause before submission,
and resume after BUILD job 20 and a local disk migration have completed. The BE
process and connection survive migration, so the DROP reaches the replacement
tablet, sees an empty map and removes the index. `isCancelled` is not checked
after conversion, and migration's locks do not preserve history after
replacement. Please preserve these per-index high-water marks across tablet
replacement, or keep them in a stable owner, and cover BUILD → migration/reload
→ late older DROP in a test. The added BE test retains the same `_tablet`
throughout, so it misses this case.
--
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]