Skip to content

feat(process): bound cached now freshness - #1083

Draft
samcamwilliams wants to merge 1 commit into
edgefrom
impr/process-cache-freshness
Draft

samcamwilliams wants to merge 1 commit into
edgefrom
impr/process-cache-freshness

Conversation

@samcamwilliams

Copy link
Copy Markdown
Collaborator

Add computed-at time tracking to the process-cache. This allows nodes to set the maximum frequency a process will be refreshed at, and requests to suggest the maximum age of a computed result that they would like to receive. I think this PR needs to be rewritten so submitting as a draft. The idea is sensible and necessary, though.

Cached /now reads can otherwise hide newly scheduled assignments indefinitely. Record the scheduler target before computation and refresh its timestamp only when that slot is durably cached. Requests with a finite max-age then return through the scheduler and compute path when the cached state is stale; the call-site default remains infinity, so no redundant hb_opts default is required.

Apply the optional process-store and existing process-cache scope consistently to process cache reads and writes. Keep these single-consumer helpers private to dev_process_cache, store freshness as a normal cache message and stable link, and preserve normal hb_ao resolution semantics.

Repair the process-cache backend suite so it actually exercises FS, LMDB, and volatile stores. Retain real process fixtures and strict message matching, and add AO-level expiration plus isolated process-store coverage.

Validation:
- rebar3 as test compile
- rebar3 device test -d dev_process,dev_process_cache --timeout 180 (14 passed)
- rebar3 eunit-all (changed tests pass; 3519 passed, with 5 unrelated edge failures: one push peer-routing failure reproduced on detached clean edge and four existing legacy scheduler HTTP failures)
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