Skip to content

docs: keyed Iceberg appends on other engines read by time, partitioned Cayenne snapshots, Cayenne in the Cluster-Sidecar example - #2442

Merged
lukekim merged 4 commits into
trunkfrom
docs-sync/2026-10-27-snapshots-append-sidecar
Oct 27, 2026
Merged

lukekim merged 4 commits into
trunkfrom
docs-sync/2026-10-27-snapshots-append-sidecar

Conversation

@spiceemma

Copy link
Copy Markdown
Contributor

Summary

This PR combines two Forward updates and one Audit correction.

Forward (vNext and 2.4.x): both source PRs were cherry-picked into v2.4.0 (97d9b38549 and c87fa6236b are ancestors of v2.4.0). They change the current release's behavior, so both website/docs/ and version-2.4.x change.

  1. Keyed Iceberg append on engines other than Cayenne reads by time (refresh-modes/append, components/data-connectors/iceberg, reference/spicepod/datasets). This applies to an acceleration on an engine other than Cayenne whose primary_key does not include the time_column. Its append refresh of an Iceberg source no longer follows snapshots. It reads by time, applies refresh_append_overlap, and does not load a row that arrives later than the overlap. Without an overlap, it logs a warning at load. A new subsection documents this, and the three pages that said Iceberg appends always follow snapshots now name the exception.
  2. Partitioned Cayenne accelerations publish snapshots (snapshots, partitioning): the limitation bullets saying they skip snapshots are removed.

Audit (Cluster-Sidecar architecture, vNext and 2.4.x): the page is a shared partial that every version from 2.0.x to vNext imports. Its 2.0.x–2.3.x content is copied unchanged to _cluster-sidecar-v2.3.mdx, and those four version pages now import the copy. The original partial, still used by vNext and 2.4.x, is corrected:

  1. The sidecar example used engine: duckdb with snapshots: bootstrap_only against snapshots that the cluster creates with engine: cayenne. Snapshots from another engine are skipped, so the sidecar would never bootstrap from them. The sidecar now uses engine: cayenne, and the guidance says to use the same engine on both sides.
  2. The prose recommended DuckDB, SQLite, and Arrow for the sidecar working set. Engines other than Cayenne are deprecated in v2.4.0, so the prose now recommends Cayenne and links the migration guide.
  3. The cluster example set on_conflict: {id: upsert} on a Cayenne dataset. v2.4.0 logs that Cayenne no longer uses on_conflict, so the example drops it.

Source PRs

Reproduction

The audit items are checked against spiceai/spiceai v2.4.0. vNext is the same at origin/trunk 814e639e8eb55eacbe3f3fadaad2ec0aaf712c05.

Item 3: snapshot engine mismatch (Unverified, code inspection only)

Doc said (website/src/partials/deployment/architectures/_cluster-sidecar.mdx:203 at docs 31f71082): the sidecar orders uses engine: duckdb / snapshots: bootstrap_only, while the cluster's orders (line 151) uses engine: cayenne / snapshots: create_only, at the same location.

Code says (crates/runtime-acceleration/src/snapshot/mod.rs at v2.4.0, lines 2905–2917):

// Early engine filtering: skip snapshots created by a different engine before
// attempting any download. ...
if let Some(ref snap_engine) = snapshot.snapshot_engine
    && !snap_engine.eq_ignore_ascii_case(&current_engine)
{ ... first_failure.get_or_insert_with(|| SnapshotDownloadError::EngineMismatch { ... })

Behavior claim: not run. This needs object storage plus a PostgreSQL CDC source. The correction is based on reading the code above, which skips every snapshot made by another engine.

Item 4: non-Cayenne engines deprecated (Reproduced, name and existence claim)

Doc said (_cluster-sidecar.mdx:66,110,224,270): "(Arrow, DuckDB, or SQLite)", "Use DuckDB or SQLite in mode: file on the sidecar", "It executes against DuckDB", "a local DuckDB + vector index".

Code says (crates/runtime/src/component/mod.rs:207 at v2.4.0):

"Acceleration engines other than `cayenne` are deprecated and will be removed in v2.5, so these accelerations must move to `cayenne` before upgrading: {engines}. ..."

Item 5: on_conflict on Cayenne (Reproduced, name and existence claim)

Doc said (_cluster-sidecar.mdx:155-157): primary_key: id / on_conflict: / id: upsert under engine: cayenne.

Code says (crates/runtime/src/init/dataset.rs:3378 at v2.4.0):

"Dataset '{dataset_name}' sets `acceleration.on_conflict`, which Cayenne no longer uses{change} Remove `on_conflict`. See: https://spiceai.org/docs/features/data-acceleration/constraints"

At v2.3.3, neither deprecation string exists. That is why the 2.0.x–2.3.x pages keep the old text through the copied partial:

$ git grep -n 'which Cayenne no longer uses' v2.3.3 -- crates        -> (no output)
$ git grep -n 'other than `cayenne` are deprecated' v2.3.3 -- crates -> (no output)
$ git grep -n 'Snapshot engine mismatch' v2.3.3 -- crates
v2.3.3:crates/runtime-acceleration/src/snapshot/mod.rs:414: "Snapshot engine mismatch for dataset {dataset}. ..."

The engine mismatch also exists at v2.3.3, so item 3 applies to the copied 2.3.x-and-older partial as well. That copy is left unchanged here, because whether Cayenne snapshots work on those releases has not been checked. It is listed as a follow-up.

Verification

Forward items, read at v2.4.0 and origin/trunk 814e639e:

crates/runtime/src/init/dataset.rs:3434 (trunk) / :3411 (v2.4.0)
fn reads_by_time_despite_commits(acceleration, time_column, refresh_mode) -> bool {
    let (Some(time_column), Some(key)) = (time_column, acceleration.primary_key.as_ref()) else { return false; };
    refresh_mode == RefreshMode::Append
        && !acceleration.orders_versions_by_time(Some(time_column), refresh_mode)
        && !key.iter().any(|column| column == time_column)
}
crates/runtime-acceleration/src/acceleration.rs:992-999
pub fn orders_versions_by_time(...) -> bool { self.engine == Engine::Cayenne && time_column.is_some() && matches!(refresh_mode, RefreshMode::Full | RefreshMode::Append) }
crates/runtime/src/init/dataset.rs:1725-1739  warning only when the source records commits (Iceberg) and refresh_append_overlap is none
v2.4.0:crates/runtime/src/init/dataset.rs:3428  "Dataset '{dataset_name}' (`engine: {engine}`) has no `refresh_append_overlap`, so a row that arrives after a newer one is never loaded. ..."

v2.4.0:crates/data-accelerator-api/src/snapshots.rs:257-261
pub fn archive_would_be_unrestorable(engine, engine_override) -> bool { *engine == AccelerationEngine::Cayenne && engine_override.is_none() }   (no partition_by condition)
$ git grep -n 'snapshots of a partitioned Cayenne' origin/trunk v2.4.0 -- crates   -> (no output)

Known limitations: spiceai/spiceai#15346 says a row later than the overlap window is not loaded on these engines, and the page states this.

Propagation:

$ grep -rln 'skip periodic and pre-recreate snapshots\|do not support partitioned tables' website/docs website/versioned_docs/version-2.4.x | wc -l
0

version-2.3.x keeps its partitioned-snapshot limitation and its Iceberg append text, because neither source commit is in v2.3.3.

Files changed: 16 (5 vNext pages, 5 2.4.x pages, the corrected partial, the new _cluster-sidecar-v2.3.mdx, and 4 version pages whose import now points at the copy).

Build: NODE_OPTIONS=--max-old-space-size=12288 npm run build:

[SUCCESS] Generated static files in "build".
exit=0

Style grep over the added lines: no hits (style exit=1, meaning grep found nothing).

Test plan

  • cd website && npm run build passes (output above)
  • Versioned-docs propagation checked (grep above)
  • Files updated: 16 (git diff --name-only origin/trunk..HEAD | wc -l = 16)

Review gate

…enne snapshots, Cayenne on the cluster-sidecar example
@spiceemma
spiceemma requested a review from a team as a code owner October 27, 2026 14:55
Copilot AI balanced review requested due to automatic review settings October 27, 2026 14:55
@spiceemma spiceemma self-assigned this Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ Pull with Spice Passed

Passing checks:

  • ✅ Title meets minimum length requirement (10 characters)
  • ✅ Has at least one of the required labels: area/blog, area/docs, area/cookbook, dependencies
  • ✅ No banned labels detected
  • ✅ Has at least one assignee: spiceemma

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Pull with Spice Failed

Passing checks:

  • ✅ Title meets minimum length requirement (10 characters)
  • ✅ Has at least one of the required labels: area/blog, area/docs, area/cookbook, dependencies
  • ✅ No banned labels detected

Failed checks:

  • ❌ At least one assignee is required for this pull request.

Please address these issues and update your pull request.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 deployed to https://4f8098dc.spiceai-org-website.pages.dev

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The append guidance incorrectly promises protection against stale overwrites when older versions fall inside the overlap window.

1 open issue
What changed in this PR

Updates vNext and 2.4.x documentation for Iceberg append refreshes and partitioned Cayenne snapshots, and corrects the current Cluster-Sidecar example while preserving older-version content.

Changes:

  • Documents time-based reads and overlap limits for keyed Iceberg appends on non-Cayenne engines.
  • Removes outdated partitioned Cayenne snapshot limitations.
  • Uses Cayenne on both sides of the current snapshot example and separates the legacy architecture partial.
File Description
website/​versioned_docs/​version-2.4.x/​reference/​spicepod/​datasets.md Adds the keyed Iceberg overlap exception.
website/​versioned_docs/​version-2.4.x/​features/​data-acceleration/​snapshots.md Removes the partitioned snapshot restriction.
website/​versioned_docs/​version-2.4.x/​features/​data-acceleration/​refresh-modes/​append.md Explains time-based appends and the startup warning.
website/​versioned_docs/​version-2.4.x/​features/​data-acceleration/​partitioning.md Removes the snapshot publication limitation.
website/​versioned_docs/​version-2.4.x/​components/​data-connectors/​iceberg.md Adds the time-based append exception.
website/​versioned_docs/​version-2.3.x/​deployment/​architectures/​cluster-sidecar.md Imports the preserved legacy partial.
website/​versioned_docs/​version-2.2.x/​deployment/​architectures/​cluster-sidecar.md Imports the preserved legacy partial.
website/​versioned_docs/​version-2.1.x/​deployment/​architectures/​cluster-sidecar.md Imports the preserved legacy partial.
website/​versioned_docs/​version-2.0.x/​deployment/​architectures/​cluster-sidecar.md Imports the preserved legacy partial.
website/​src/​partials/​deployment/​architectures/​_cluster-sidecar.mdx Aligns snapshot engines and updates Cayenne guidance.
website/​src/​partials/​deployment/​architectures/​_cluster-sidecar-v2.3.mdx Preserves architecture content for older releases.
website/​docs/​reference/​spicepod/​datasets.md Adds the keyed Iceberg overlap exception.
website/​docs/​features/​data-acceleration/​snapshots.md Removes the partitioned snapshot restriction.
website/​docs/​features/​data-acceleration/​refresh-modes/​append.md Explains time-based appends and the startup warning.
website/​docs/​features/​data-acceleration/​partitioning.md Removes the snapshot publication limitation.
website/​docs/​components/​data-connectors/​iceberg.md Adds the time-based append exception.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 27, 2026 15:07
@spiceemma

Copy link
Copy Markdown
Contributor Author

Round 1 responses (HEAD 3c3afca):

Local gate: cd website && npm run build succeeded on 3c3afca ("Generated static files in "build"").

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The append guidance must distinguish time-based reads from upsert-dependent replacement behavior to avoid misleading configuration advice.

1 open issue
1 resolved since last review

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

🚀 deployed to https://da1397b9.spiceai-org-website.pages.dev

Copilot AI balanced review requested due to automatic review settings October 27, 2026 15:13
@spiceemma

Copy link
Copy Markdown
Contributor Author

Round 2 responses (HEAD 13aad94):

Local gate: cd website && npm run build succeeded on 13aad94.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Both append summaries omit the key/time-column condition and therefore overstate which accelerations depend on an overlap window.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Qualify overlap-window exception for time-column primary keys

website/​docs/​features/​data-acceleration/​refresh-modes/​append.md:37

Non-Cayenne accelerations whose primary_key includes time_column still follow Iceberg snapshots, so this summary incorrectly implies that their late rows depend on an overlap window. Qualify the exception with primary_key not including time_column, matching the subsection below and the source change. Same issue in website/versioned_docs/version-2.4.x/features/data-acceleration/refresh-modes/append.md:37.

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 27, 2026 15:19
@spiceemma

Copy link
Copy Markdown
Contributor Author

Round 3 responses (HEAD 6317e20):

Local gate: cd website && npm run build succeeded on 6317e20.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 deployed to https://23a37f0e.spiceai-org-website.pages.dev

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

The documentation matches the supplied runtime evidence, preserves historical content, and has no unresolved blocking findings.

No open issues 🎉

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

🚀 deployed to https://1a36880f.spiceai-org-website.pages.dev

@lukekim
lukekim merged commit 855969e into trunk Oct 27, 2026
8 checks passed
@lukekim
lukekim deleted the docs-sync/2026-10-27-snapshots-append-sidecar branch October 27, 2026 16:54

This branch was successfully deployed

1 active deployment
preview — 6317e204 Deployed Oct 27, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants