Skip to content
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

Merged
merged 108 commits into from
Feb 13, 2020

Conversation

jaspercloud
Copy link
Contributor

Ⅰ. 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

jaspercloud and others added 30 commits November 19, 2019 11:10
# 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"
jaspercloud and others added 13 commits February 8, 2020 00:47
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
Copy link
Member

@jsbxyyx jsbxyyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left comment

Copy link
Contributor

@l81893521 l81893521 left a 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

Copy link
Member

@jsbxyyx jsbxyyx left a 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.

@slievrly slievrly changed the title feature: support postgresql feature: support postgresql(client and server) Feb 13, 2020
@slievrly slievrly merged commit 3afd118 into apache:develop Feb 13, 2020
@jaspercloud jaspercloud deleted the develop branch March 3, 2020 11:26
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.

None yet

8 participants