Repository navigation
fix(http): say when a cursor or cancel reached the wrong node; add https sessionAffinity - #355
IronicRayquaza wants to merge 1 commit into
Conversation
…tps sessionAffinity HTTP result cursors and running queries live in one node's memory, but nothing keeps a client's follow-up page or cancel on that node. The errors only said "unknown or expired" / "was cancelled". - Errors now say "on this node" and that the request must reach the node that served the first page or runs the query. The old text is kept as a prefix. - Chart: service.https.sessionAffinity (None | ClientIP) and sessionAffinityTimeoutSeconds for the proxy-less multi-replica case. Default output is unchanged. - Docs: USING-HYDRADB.md and the chart README explain the requirement and point to ClientIP (proxy off) or proxy.readRouting: owner (proxy on). Refs hydra-db#327 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This is PR 1 of 3 you may keep open at a time. |
|
This PR has no linked approved issue. Open an issue, get it discussed and Maintainers: reopen this PR to override the gate (it gets the |
|
This PR has no linked approved issue. Open an issue, get it discussed and Maintainers: reopen this PR to override the gate (it gets the |
1 similar comment
|
This PR has no linked approved issue. Open an issue, get it discussed and Maintainers: reopen this PR to override the gate (it gets the |
Summary
This is the small option from #327. It documents the affinity requirement, makes the errors say what went wrong, and adds a chart option for the proxy-less multi-replica case. It does not change routing, so the node-id routing idea in the issue stays open for later.
Errors (
src/client/service.rs). The old text is kept as a prefix, so existing substring matches still work.result cursor is unknown or expired on this node; a cursor lives only on the node that served the first page, so send every page of a scan to that nodeno active query with id … was cancelled on this node; a query can only be cancelled on the node that runs itChart
service.https.sessionAffinity(None|ClientIP, defaultNone) andsessionAffinityTimeoutSeconds(default 10800, the Kubernetes default). WithClientIP, the-httpsService renderssessionAffinity/sessionAffinityConfig. With the default, the rendered output is unchanged.httpsis nowallOfthe sharedservicedefinition plus these two keys, so a bad value failshelm template.proxy.readRoutingsays thatfleetre-routes every page request, and recommendsownerfor clients that page HTTP results or cancel reads.Docs.
USING-HYDRADB.md(Pagination and the cancel bullet) and the chart README say that cursors and running queries live on one node. They name the setting to use:ClientIPwith the proxy off,readRouting: ownerwith it on.Testing
helm lint hydradb -f ci/ci-values.yamlpasses.helm templatewith default values renders nosessionAffinity.--set service.https.sessionAffinity=ClientIP --set service.https.sessionAffinityTimeoutSeconds=600, it renderssessionAffinity: ClientIPandtimeoutSeconds: 600.sessionAffinity=Stickyis rejected by the schema.rustfmt --check(edition 2021, reporustfmt.toml) passes onservice.rs. No test asserts on the full text of either error.Linked issue
Closes #327
AI Assistance
Checklist
/approved.Breaking changes
None. Error messages gain a suffix, and the old text is unchanged as a prefix. The chart output is unchanged unless
sessionAffinity: ClientIPis set.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.