Repository navigation
docs(runtime): one instance identity for every shared-state feature - #2384
Merged
Merged
Conversation
Contributor
✅ Pull with Spice PassedPassing checks:
|
Contributor
🔍 Pull with Spice FailedPassing checks:
Failed checks:
Please address these issues and update your pull request. |
Contributor
|
🚀 deployed to https://9ecd6e3e.spiceai-org-website.pages.dev |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The executor example needs startup corrections, and the upgrade warning misstates which identity configurations change replication slots.
2 open findings
What changed in this PR
Documents the shared runtime instance identity introduced by spiceai/spiceai#15135 in vNext documentation.
Changes:
- Defines identity resolution and duplicate-identity reporting.
- Explains cluster registration, executor restarts, and snapshot leases.
- Adds PostgreSQL replication-slot upgrade guidance.
| File | Description |
|---|---|
| website/docs/reference/spicepod/runtime.md | Adds the shared identity reference. |
| website/docs/features/distributed-query/index.md | Documents node identities and same-host execution. |
| website/docs/features/data-acceleration/snapshots.md | Updates lease identity and error reporting. |
| website/docs/features/cdc/postgres-replication.md | Explains fallback changes and abandoned-slot cleanup. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…e executor example
Contributor
|
🚀 deployed to https://020704ad.spiceai-org-website.pages.dev |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

spiceai/spiceai#15135 gives every feature that coordinates through shared state one instance identity:
SPICE_INSTANCE_ID, elseHOSTNAME, elseCOMPUTERNAME, else the operating system's host name, with an empty variable treated as unset. Schedulers now register under the identity instead ofhost:port, executors use it as their executor ID, and a shared identity logs one error message across the scheduler, executor, and snapshot writer lease. Before this change, the docs described the identity only for PostgreSQL replication slots (without the host-name fallback) and snapshot leases (as a warning), and did not mention that two schedulers or executors on one host need distinct identities.Pages changed
website/docs/reference/spicepod/runtime.md: new "Instance identity" section underruntime.statewith the resolution order, the features that use it, and the duplicate-identity error.website/docs/features/distributed-query/index.md: new "Instance Identity" section: per-nodeSPICE_INSTANCE_IDfor several nodes on one host, executor restart handling, and the previoushost:portbehavior.website/docs/features/data-acceleration/snapshots.md: identity order and the shared-identity error (now an error, not a warning).website/docs/features/cdc/postgres-replication.md: host-name fallback, a note on slots left behind when the identity changes, and an upgrade warning for instances with no identity variable or an emptySPICE_INSTANCE_ID.Versioned docs
vNext only.
git tag --contains 64fb958982990a5be4cb824fe5b371b84d98f5a8returns no tags, so neither v2.4.0-rc.1 nor v2.4.0-rc.2 includes the change. The upgrade notes name v2.4.0-rc.2 and earlier because rc testers and v2.3.x users moving to the next release see the new slot name and scheduler/executor identities. Versioned 2.3.x text is correct for its release and is unchanged.Verification
Trunk SHA
9a25991b0384c7fc6b25fc838d6d71ce6f65ea57.pub const SPICE_INSTANCE_ID: &str = "SPICE_INSTANCE_ID";(crates/util/src/instance_id.rs:27)const IDENTITY_VARIABLES: [&str; 3] = [SPICE_INSTANCE_ID, "HOSTNAME", "COMPUTERNAME"];(crates/util/src/instance_id.rs:30), host-name fallback|| gethostname::gethostname().to_string_lossy().into_owned(),(crates/util/src/instance_id.rs:35).find_map(|name| env(name).filter(|value| !value.is_empty()))(crates/util/src/instance_id.rs:53)"Another running instance uses {SPICE_INSTANCE_ID} '{instance_id}' at state location '{location}'. Give each instance its own {SPICE_INSTANCE_ID} (for example the pod name)."(crates/util/src/instance_id.rs:62)let scheduler_id = datafusion.cluster_config.instance_id().to_string();(crates/runtime/src/cluster/scheduler_registry.rs:187); previously"{advertise_host}:{}",(v2.4.0-rc.2 crates/runtime/src/cluster/scheduler_registry.rs:168)let executor_id = rt.df.cluster_config.instance_id().to_string();(crates/runtime/src/cluster/mod.rs:1344); previouslylet executor_id = format!("{advertise_host}:{advertise_port}");(v2.4.0-rc.2 crates/runtime/src/cluster/mod.rs:1322)"Executor '{executor_id}' restarted, so the tasks and shuffle output of its earlier run are rescheduled"(crates/runtime/src/cluster/service.rs:647)LazyLock::new(|| util::instance_id::instance_id().into());(crates/runtime-acceleration/src/snapshot/writer_lease.rs:83), logged withtracing::error!((crates/runtime-acceleration/src/snapshot/writer_lease.rs:639)format!("{instance_id}/{}", uuid::Uuid::new_v4())(crates/data-http-rate-control/src/lib.rs:2041).unwrap_or_else(|| "unknown".to_string())(v2.4.0-rc.2 crates/data_components/src/postgres_replication/config.rs:487)_3f484bfe(no variable) and_38d394c2(emptySPICE_INSTANCE_ID), and unchanged slot names when a variable is set, from the source PR's unit testsslot_name_without_identity_variables_comes_from_the_host_name,slot_name_with_an_empty_spice_instance_id_uses_the_next_source, andslot_names_from_identity_variables_are_unchanged: feat: one instance identity for every shared-state feature spiceai#15135a_second_running_process_under_one_identity_is_a_duplicateanda_restart_after_a_crash_is_not_a_duplicate: feat: one instance identity for every shared-state feature spiceai#15135spicedprocess holds an exclusive lock on its instance directory (SPICE_CONFIG_DIR), claimed unconditionally at startup (bin/spiced/src/main.rs:202).std::env::var("SPICE_INSTANCE_ID"), with no empty-value filter before.ok()on the next line (v2.4.0-rc.2 crates/data_components/src/postgres_replication/config.rs:484)npm run buildinwebsite/passed locally ([SUCCESS] Generated static files in "build"., exit 0; no broken links or anchors reported)