Repository navigation
Conversation
`RefreshTask` reads the refresh cursor back from the Iceberg snapshot only when the target is a `StorageObjectStorage`. Under `parallel_replicas_for_cluster_engines` a data lake catalog table resolves to `StorageObjectStorageCluster`, which since #119214 can be written to. The sink commits the cursor with the data, but on resume the task does not recognise the target and falls back to the Keeper cursor. For an Atomic database there is none, so after a server restart the next refresh re-reads the source from the beginning and duplicates rows silently. Fail closed: if the target reports `isDataLake` but is not a storage the task knows how to read the cursor from, throw `NOT_IMPLEMENTED` instead of resuming from the wrong cursor. Related: #119214 Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Workflow [PR], commit [2cb69b8] Summary: ❌
AI ReviewSummaryThe PR tries to fail closed when an incremental refreshable MV resumes against a data-lake target whose cursor is committed with the data but cannot be read back through the current storage interface. That is the right area to harden, but the new guard is too broad: it now rejects supported Keeper-backed data-lake targets as well, and the PR does not add focused regression coverage for the Findings❌ Blockers
Tests
Final Verdict
LLVM Coverage ReportMeasured on commit 2cb69b8.
Changed lines: Changed C/C++ lines covered: 5/10 (50.00%) · Uncovered code |
| cursor_persisted_by_target = true; | ||
| stream_cursor = object_storage->loadRefreshCursor(refresh_context); | ||
| } | ||
| else if (target_table->isDataLake()) |
There was a problem hiding this comment.
This isDataLake() branch is broader than the bug you describe. It also fires for the plain StorageObjectStorage path when the catalog is non-transactional: isTransactionalRefreshTarget() returns false there by design because those tables are supposed to keep using the Keeper cursor (src/Storages/ObjectStorage/StorageObjectStorage.cpp:484-488), and RefreshTask still persists out_cursor to Keeper whenever cursor_persisted_by_target stays false (src/Storages/MaterializedView/RefreshTask.cpp:1535-1539). With this change, an existing incremental MV like TO glue_db.tbl now throws NOT_IMPLEMENTED on every refresh instead of following that supported Keeper-backed path, so this is a backward-incompatible regression. The rejection needs to be limited to targets that commit the cursor with the data but cannot load it back (for example the cluster wrapper), not every data-lake target.
RefreshTaskreads the refresh cursor back from the Iceberg snapshot only when the target is aStorageObjectStorage. Underparallel_replicas_for_cluster_enginesa data lake catalog table resolves toStorageObjectStorageCluster, which since #119214 can be written to. The sink commits the cursor with the data, but on resume the task does not recognise the target and falls back to the Keeper cursor. For an Atomic database there is none, so after a server restart the next refresh re-reads the source from the beginning and duplicates rows silently.Fail closed: throw
NOT_IMPLEMENTEDinstead of resuming from the wrong cursor.Related: #119214
Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/120233]