gongycn commented on code in PR #6629:
URL: https://github.com/apache/incubator-seata/pull/6629#discussion_r1695252864
##########
rm-datasource/src/main/java/org/apache/seata/rm/datasource/xa/ConnectionProxyXA.java:
##########
@@ -226,7 +226,12 @@ public synchronized void commit() throws SQLException {
long now = System.currentTimeMillis();
checkTimeout(now);
setPrepareTime(now);
- xaResource.prepare(xaBranchXid);
+ int prepare = xaResource.prepare(xaBranchXid);
+ if (prepare == XAResource.XA_RDONLY
+ && JdbcConstants.ORACLE.equals(resource.getDbType())) {
Review Comment:
I tested four types of databases: MySQL (8), Oracle (12c), Postgres (16),
and MSSQL Server (2022). Only Oracle has read-only optimization; the others do
not provide read-only feedback. Based on these four databases, the database
type check can be eliminated here.
--
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]