spring-projects / spring-projects/spring-ai
MessageChatMemoryAdvisor,MessageWindowChatMemory currently performs full message rewrites on every before/after — suggest incremental updates and DB‑side windowing
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
Currently, MessageChatMemoryAdvisor performs a full overwrite of conversation window messages on every before/after operation, and MessageWindowChatMemory also causes duplicate DB writes. Could this be changed to incremental append? Window size control could be handled by DB query limits (e.g., LIMIT), which would also preserve full message history. What's the design rationale behind the current approach? Doesn't this introduce unnecessary DB write overhead?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing MessageChatMemoryAdvisor and MessageWindowChatMemory, focusing on their before/after persistence behavior and the duplicate database writes described here. Compare the current full-rewrite approach with incremental appends and database-side window limits; done requires an agreed design and validation of the resulting write and history behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100