hutiefang76 opened a new pull request, #4396:
URL: https://github.com/apache/hertzbeat/pull/4396
## What's changed?
Fixes #4393.
Chat message history queries now run in read-only transactions. PostgreSQL
maps the existing `@Lob String` field to a large object; without a transaction
its driver rejects result materialization in auto-commit mode, causing the chat
stream and history endpoints to fail.
The fix preserves the existing column type and message data. It scopes only
the two derived read queries used by `streamChat`, `getConversation`, and
`getAllConversations`.
## Validation
- `./mvnw -q -pl hertzbeat-startup -am
-Dtest=ChatMessageDaoPostgresqlTransactionTest
-Dsurefire.failIfNoSpecifiedTests=false test`
- PostgreSQL 17 Testcontainers regression: passed (1 test)
- `./mvnw -q -pl hertzbeat-ai -am -Dtest=ConversationServiceImplTest
-Dsurefire.failIfNoSpecifiedTests=false test`
- passed (9 tests)
## Checklist
- [x] I have read the Contributing Guide.
- [x] I have added the necessary unit/integration test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]