-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Labels
task: help-wantedExtra attention is neededExtra attention is needed
Description
Check Ahead
-
I have searched the issues of this repository and believe that this is not a duplicate.
-
I am willing to try to fix this bug myself.
Ⅰ. Issue Description
I found that in the PostgresqlUndoLogManager class, the sequence name undo_log_id_seq used in the insert SQL statement is hardcoded:
INSERT INTO undo_log (...) VALUES (nextval('undo_log_id_seq'), ...)
This causes an issue when the undo log table name is customized via configuration (e.g., in application.yml). Because the sequence name does not update to match the new table name, insert operations fail or behave incorrectly.
Steps to reproduce:
- Configure Seata to use a custom undo log table name, for example my_undo_log.
- The sequence name remains hardcoded as undo_log_id_seq in the SQL.
- On insert, PostgreSQL throws an error because the sequence undo_log_id_seq does not exist or does not match the new table.
Expected behavior:
- The sequence name used in the insert SQL should be dynamically derived from the configured undo log table name, for example my_undo_log_id_seq for table my_undo_log.
- This would make the undo log manager compatible with table name customization.
Suggested fix:
- Make the sequence name configurable or derived from the undo log table name dynamically.
- Update the insert SQL statement in PostgresqlUndoLogManager accordingly.
Ⅱ. Describe what happened
No response
Ⅲ. Describe what you expected to happen
No response
Ⅳ. How to reproduce it (as minimally and precisely as possible)
No response
Ⅴ. Anything else we need to know?
No response
Ⅵ. Environment
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
task: help-wantedExtra attention is neededExtra attention is needed