Skip to content

Bound invocation result state in worker status - #3820

Open
vigoo wants to merge 6 commits into
mainfrom
gol-175-bounded-invocation-results
Open

Bound invocation result state in worker status#3820
vigoo wants to merge 6 commits into
mainfrom
gol-175-bounded-invocation-results

Conversation

@vigoo

@vigoo vigoo commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the unbounded in-memory invocation-result map in AgentStatusRecord with a bounded recent exact map plus a fixed-size Bloom filter
  • maintain the complete idempotency-key-to-oplog-index mapping in a dedicated physical KV namespace, with bounded chunked oplog catch-up and branch invalidation across reverts
  • resolve invocation results through hydrated payloads, bounded status membership, the physical index, and a bounded oplog fallback while serializing duplicate admission through the status actor
  • bound the hydrated invocation-result payload cache and add configuration, metrics, storage coverage, and an idempotency-key lookup benchmark
  • upgrade to desert_rust 0.1.11 and derive codecs directly for the im::OrdMap/im::Vector-backed status types

Design

The hot path stays in memory for recent results and definitive Bloom-filter misses. Once the bounded exact status map evicts older entries, Bloom positives consult the complete physical index. The index records coverage and revert generation, so it is only authoritative after catching up through the status oplog index and cannot return stale results from an obsolete branch. Cold reconstruction and old uncached lookups use bounded oplog chunks rather than retaining an unbounded intermediate map.

Verification

  • cargo test -p golem-worker-executor --lib worker::status::test -- --report-time
  • cargo test -p golem-worker-executor --lib services::worker::tests -- --report-time
  • cargo test -p golem-worker-executor --lib invocation_result_cache -- --report-time
  • cargo test -p golem-common invocation_result_membership -- --report-time
  • cargo test -p golem-worker-executor --test key_value_storage agent_invocation_result_index -- --report-time
  • cargo check -p golem-worker-executor --lib
  • cargo check -p integration-tests --bin benchmarks
  • cargo clippy -p golem-common --all-targets --no-deps -- -D warnings
  • cargo clippy -p golem-worker-executor --all-targets --no-deps -- -D warnings
  • cargo fmt --all --check
  • cargo make generate-configs

The new benchmark is compiled but was not run against benchmark infrastructure.

Resolves GOL-175

@vigoo
vigoo requested a review from a team September 3, 2026 09:12
@netlify

netlify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploy Preview for golemcloud canceled.

Name Link
🔨 Latest commit 1651a87
🔍 Latest deploy log https://app.netlify.com/projects/golemcloud/deploys/6a9c223291ff570008273cce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant