Memory fixes for EPP - #4
Open
Lucas-Fernandes-Martins wants to merge 12 commits into
Open
Conversation
Signed-off-by: Lucas Fernandes Martins <lucas.fernandesmartins@macbook-pro-lucasmartins.cheetah-koi.ts.net> Signed-off-by: Lucas-Fernandes-Martins <lucasfmartins16@gmail.com>
Signed-off-by: Lucas-Fernandes-Martins <lucasfmartins16@gmail.com>
Signed-off-by: Lucas-Fernandes-Martins <lucasfmartins16@gmail.com>
The Get method now accepts a caller-supplied aggregate function so store implementations can fold per-replica values without hardcoding aggregation logic. Signed-off-by: Lucas-Fernandes-Martins <lucasfmartins16@gmail.com>
Signed-off-by: Lucas-Fernandes-Martins <lucasfmartins16@gmail.com>
Implement a Redis-backed CrossReplicaStore that enables cross-replica
state aggregation. Each EPP replica writes its local state to Redis
keyed by {stateKey}:{endpointID}:{replicaID}, and reads aggregate
across all replicas via KEYS scan + caller-supplied aggregation
function.
Signed-off-by: Lucas-Fernandes-Martins <lucas.fernandesmartins@mistral.ai>
Signed-off-by: Lucas-Fernandes-Martins <lucasfmartins16@gmail.com>
- Replace KEYS+GET pattern with HSET/HGETALL (hash-per-endpoint) - Add configurable TTL (default 180s) to expire stale replica data - Add Ping health check at startup - Log decode errors at DEBUG level instead of silently continuing
Dead replicas' hash fields persist because live replicas keep refreshing the hash-level EXPIRE. Fix by stamping each value with its write time and filtering entries older than TTL in Get().
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.
What type of PR is this?
What this PR does / why we need it:
Two memory fixes:
nilafter it's used for the last time to save memory (GC won't free that memory since it belongs to a struct that is still in use).Which issue(s) this PR fixes:
Release note (write
NONEif no user-facing change):