XianReallyHot-ZZH commented on PR #13834: URL: https://github.com/apache/ignite/pull/13834#issuecomment-7059535528
Hi @alex-plekhanov, thank you for the review — the PR is reworked in your direction: - **Partition destroy cleanup instead of a lookup-time workaround.** The cache-id validation is removed entirely; a partition destroy now sweeps the group row cache of the destroyed partition's entries (`IndexRowCache#clearForPartition` from `IgniteCacheOffheapManagerImpl#destroyCacheDataStore` — the funnel that both the eviction finish and the group stop go through, before the bulk store destroy). This also covers the double-rebalance case you described: a same-cache row reusing an old link, which no cache-id check can detect. - **`SortedIndexDescriptorFactory`** now passes `null` when the cache has the SQL onheap row cache disabled, so rows of such caches are no longer cached in the group row cache (this also removed the hidden problem the old test relied on). - **Tests** are replaced with `IndexRowCachePartitionDestroySelfTest`: real rebalance scenarios via public APIs only (a third node joins/leaves twice while concurrent range scans run on the first node — same-cache two-generation link reuse and cross-cache link reuse, with exact scan-result assertions), plus a test that rows of a disabled-onheap cache are not cached, and a `clearForPartition` contract test. One honest caveat: the normal eviction path (`clearAll` → `RowStore#removeRow`) already cleans the row cache per row, so the surviving-stale race (a concurrent `createIndexRow` interleave) is not deterministically reproducible without intervention into internals — the rebalance tests are regression nets over the real scenario, and the sweep semantics are locked by the unit test. - Redundant imports are gone with the old test class. Local runs: the new suite 4/4, `H2RowCacheSelfTest` 16/16. Will trigger RunAll after your first look, thank you! -- 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]
