Skip to content

fix(session-mysql): commit writes when auto-commit is disabled#1091

Open
Xiaozhiyao wants to merge 1 commit intoagentscope-ai:mainfrom
Xiaozhiyao:fix/issue-1087
Open

fix(session-mysql): commit writes when auto-commit is disabled#1091
Xiaozhiyao wants to merge 1 commit intoagentscope-ai:mainfrom
Xiaozhiyao:fix/issue-1087

Conversation

@Xiaozhiyao
Copy link
Copy Markdown

AgentScope-Java Version

1.0.11

Description

Fixes:MysqlSession Can Not Save New Sessions when auto-commit=false #1087

  • use explicit transaction handling for write methods
  • commit writes for save/delete/clear/truncate
  • restore the original autoCommit state
  • add regression tests

Tests:

  • mvn test
  • mvn -pl "agentscope-extensions/agentscope-extensions-session-mysql" -am test "-Dtest=MysqlSessionTest,MysqlSessionE2ETest"

Fixes #1087

Checklist

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (not applicable for this internal bug fix)
  • Code is ready for review

@Xiaozhiyao Xiaozhiyao requested a review from a team March 31, 2026 15:11
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 84.37500% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...io/agentscope/core/session/mysql/MysqlSession.java 84.37% 9 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@Xiaozhiyao
Copy link
Copy Markdown
Author

Hi @LearningGp , sorry to ping you. Could you please take a look when you have a moment? Thanks

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.

[Bug]: MysqlSession Can Not Save New Sessions when auto-commit=false

1 participant