Repository navigation
[CI Proof] generateManifestOnlySnapshot still seeds refs with a raw Poco::JSON::Object pointer (same bug the PR fixes in generateNextMetadata) - #112024
Conversation
generateManifestOnlySnapshot seeds `refs` with a raw Poco::JSON::Object pointer, so getObject(f_refs) returns a null Ptr and the following has(f_main) dereferences it (Poco::NullPointerException) when external metadata omits the optional `refs` object. generateNextMetadata seeds it as Poco::JSON::Object::Ptr; this proves the sibling path was missed.
|
Pre-PR Validation Gate (per ClickGap pipeline): a) Deterministic repro? ❌ b) Root cause explained? ✅ c) Fix matches root cause? ✅ d) Test intent preserved? / New tests added? ✅ e) Both directions demonstrated? ❌ f) Fix is general, not a narrow patch? ✅ |
|
Workflow [PR], commit [4662b62] Summary: ❌
AI ReviewSummaryThis PR adds a focused gtest intended to prove that Missing context / blind spots
Findings
Final VerdictStatus: |
|
|
||
| EXPECT_NO_THROW( | ||
| MetadataGenerator(metadata).generateManifestOnlySnapshot(generator, metadata_info.path, parent_id)); | ||
| EXPECT_TRUE(metadata->getObject(Iceberg::f_refs)->has(Iceberg::f_main)); |
There was a problem hiding this comment.
This only proves that refs gains a main key. A partial fix that seeds refs as an Object::Ptr but leaves Iceberg::f_main pointing at the old parent snapshot would still pass here, even though the table metadata would be inconsistent because Iceberg::f_current_snapshot_id and Iceberg::f_main would diverge. Since the comment above says this path should mirror generateNextMetadata, please also assert that metadata->getObject(Iceberg::f_refs)->getObject(Iceberg::f_main)->getValue<Int64>(Iceberg::f_metadata_snapshot_id) equals metadata->getValue<Int64>(Iceberg::f_current_snapshot_id) after the call.
There was a problem hiding this comment.
I can't see a meaningfully different rewrite from what I already attempted on this branch. A concrete next-step from you would help — e.g., what specific stress pattern, timeout, or assertion are you expecting?
|
CI failure in |
|
✅ |
Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.
Suspected bug: generateManifestOnlySnapshot still seeds refs with a raw Poco::JSON::Object pointer (same bug the PR fixes in generateNextMetadata)
Root cause: MetadataGenerator.cpp:374 uses
metadata_object->set(Iceberg::f_refs, new Poco::JSON::Object)(raw pointer) rather than the fixedPoco::JSON::Object::Ptr(new Poco::JSON::Object). The PR corrected the identical line at 262 ingenerateNextMetadatabut missed this sibling.Affected locations:
src/Storages/ObjectStorage/DataLakes/Iceberg/MetadataGenerator.cpp:374— generateManifestOnlySnapshot seeds f_refs with a raw pointersrc/Storages/ObjectStorage/DataLakes/Iceberg/MetadataGenerator.cpp:376— getObject(f_refs)->has(f_main) dereferences the null PtrWhy CI is needed: Iceberg manifest compaction (OPTIMIZE) fails with a Null pointer POCO_EXCEPTION on any table created outside ClickHouse that omits the optional
refsobject — the exact scenario the PR set out to fix, still broken on the compaction path.Suggested fix: Change MetadataGenerator.cpp:374 to
metadata_object->set(Iceberg::f_refs, Poco::JSON::Object::Ptr(new Poco::JSON::Object));, mirroring the fix applied at line 262.Assumptions
The bot recorded these claims it could not verify directly from source. A maintainer ✅ confirms; ❌ flags a wrong premise (the bot should rework or close the finding).
refs.refsobject, enough manifests to exceed the threshold, then run OPTIMIZE with allow_experimental_iceberg_compaction=1 and observe the Null pointer exception.Try it on ClickHouse Fiddle
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not applicable — temporary CI proof PR, will be closed automatically.
Documentation entry for user-facing changes