Skip to content

fix: stale in-memory session state after DatabaseSessionService.appendEvent #637

@MarvelNwachukwu

Description

@MarvelNwachukwu

Description

DatabaseSessionService.appendEvent() was not updating session.state in memory after the DB transaction. The DB transaction writes state deltas to database tables via local variables but never touches the in-memory session.state object, so any code reading session state without re-fetching from DB would see stale values (e.g., a counter incremented via state delta would still show the pre-increment value).

PRs

  • #619: fix double state delta application in DatabaseSessionService

Impact

Backend — packages/adk/src/sessions/database-session-service.ts

Metadata

Metadata

Labels

ADK-TSIssues relating to the ADK frameworkbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions