Skip to content

fix: make preset question batch save transactional - #630

Open
hayben-wu wants to merge 2 commits into
spring-ai-alibaba:mainfrom
hayben-wu:fix/preset-question-batch-transaction
Open

hayben-wu wants to merge 2 commits into
spring-ai-alibaba:mainfrom
hayben-wu:fix/preset-question-batch-transaction

Conversation

@hayben-wu

Copy link
Copy Markdown

Summary

Add transaction handling for preset-question batch saves to prevent partial updates when an insert fails.

Changes

  • Add a transaction boundary to batchSave
  • Add a unit test for insert-failure propagation
  • Add an H2 integration test verifying database rollback

Testing

  • AgentPresetQuestionServiceImplTest: 10 passed
  • AgentPresetQuestionServiceTransactionIntegrationTest: 1 passed
  • Checkstyle: 0 violations

Notes

The full test suite currently has 6 failures in PromptHelperTest,
NodeTracingLifecycleListenerTest, and PlannerNodeTest. The affected tests
also reproduce when run independently and are outside the files changed in this PR.

This branch has not been deployed

No deployments
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.

1 participant