-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: support postgresql(client and server) #2200
Conversation
# Conflicts: # core/src/main/java/io/seata/core/store/db/LogStoreSqls.java # rm-datasource/src/main/java/io/seata/rm/datasource/sql/SQLVisitorFactory.java # rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoExecutorFactory.java
# Conflicts: # rm-datasource/src/main/java/io/seata/rm/datasource/undo/AbstractUndoLogManager.java # rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoExecutorFactory.java
# Conflicts: # rm-datasource/src/main/java/io/seata/rm/datasource/undo/KeywordCheckerFactory.java
2.PostgresqlUndoLogManager unsupport "with" 3.BasePostgresqlRecognizer when "o instanceof Null"
use nextval('undo_log_id_seq')
# Conflicts: # rm-datasource/src/main/java/io/seata/rm/datasource/AsyncWorker.java # rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/cache/PostgresqlTableMetaCache.java # rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoLogManager.java # rm-datasource/src/main/java/io/seata/rm/datasource/undo/postgresql/PostgresqlUndoLogManager.java
# Conflicts: # rm-datasource/src/main/java/io/seata/rm/datasource/AsyncWorker.java # rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/cache/PostgresqlTableMetaCache.java # rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoLogManager.java # rm-datasource/src/main/java/io/seata/rm/datasource/undo/postgresql/PostgresqlUndoLogManager.java
rm-datasource/src/main/java/io/seata/rm/datasource/AsyncWorker.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left comment
...ource/src/main/java/io/seata/rm/datasource/undo/postgresql/PostgresqlUndoDeleteExecutor.java
Show resolved
Hide resolved
...ource/src/main/java/io/seata/rm/datasource/undo/postgresql/PostgresqlUndoInsertExecutor.java
Show resolved
Hide resolved
...ource/src/main/java/io/seata/rm/datasource/undo/postgresql/PostgresqlUndoUpdateExecutor.java
Show resolved
Hide resolved
...tasource/src/main/java/io/seata/rm/datasource/sql/struct/cache/PostgresqlTableMetaCache.java
Outdated
Show resolved
Hide resolved
...tasource/src/main/java/io/seata/rm/datasource/sql/struct/cache/PostgresqlTableMetaCache.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Test passed. Test case below:
Insert:
insert into account_tbl(id, user_id, money) values (?, ?, ?)", id, userId, money)
insert into \"account_tbl\"(id, user_id, money) values (?, ?, ?)", id + 1, userId, money)
Delete:
delete from account_tbl where user_id = ?
delete from "account_tbl" where user_id = ?
delete from account_tbl where user_id in (?)
delete from "account_tbl" where user_id in (?)
delete from account_tbl where id between ? and ?
delete from "account_tbl" where id between ? and ?
Update:
update account_tbl set money = money - ? where user_id = ?
update "account_tbl" set money = money - ? where user_id = ?
update account_tbl set money = money - ? where user_id in (?)
update "account_tbl" set money = money - ? where user_id in (?)
update account_tbl set money = money - ? where user_id between ? and ?
update "account_tbl" set money = money - ? where user_id between ? and ?
Select:
select * from account_tbl where id = ? for update
select * from "account_tbl" where id = ? for update
select * from account_tbl where id in (?) for update
select * from "account_tbl" where id in (?) for update
select * from account_tbl where id between ? and ? for update
select * from "account_tbl" where id between ? and ? for update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, auto increment wait refactor pr.
Ⅰ. Describe what this PR did
support PostgreSQL
Ⅱ. Does this pull request fix one issue?
#1279 #1170 #1641 #1972 #1641 #1987 #2143 #2149
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews