Repository navigation
Commit 5c17b74
committed
[fix](catalog) gate Cache B partition-ranges reuse on a real (non-sentinel) MVCC snapshot id
PluginDrivenMvccExternalTable#getPartitionMetaVersion keys NereidsSortedPartitionsCacheManager
(Cache B) on "<snapshotId>@<schemaId>" from the pinned ConnectorMvccSnapshot. Hive's
beginQuerySnapshot always pins snapshotId == -1 (hive has no real MVCC snapshot), so for hive
that token is a CONSTANT across queries and cannot detect a partition-set change: a cache hit
could serve SortedPartitionRanges built from an older partition set than the current pin's
nameToPartitionItem (e.g. after a CachingHmsClient TTL refresh with no invalidate event),
pruning against a stale range set and dropping partitions from the result.
Override getSortedPartitionRanges to return Optional.empty() when the pinned snapshot's
snapshotId == -1, so the caller (PruneFileScanPartition) builds ranges fresh every query for
hive (and for an empty iceberg/paimon table, which also pins -1 but is already unreachable via
the caller's !nameToPartitionItem.isEmpty() guard); a real snapshot id (iceberg/paimon) keeps
delegating to super's cache-manager lookup, unchanged.1 parent d4b3830 commit 5c17b74
2 files changed
Lines changed: 76 additions & 0 deletions
File tree
- fe/fe-core/src
- main/java/org/apache/doris/datasource/mvcc
- test/java/org/apache/doris/common/cache
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
645 | 646 | | |
646 | 647 | | |
647 | 648 | | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
648 | 672 | | |
649 | 673 | | |
650 | 674 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
300 | 352 | | |
301 | 353 | | |
302 | 354 | | |
| |||
0 commit comments