You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "lklogs (via GitHub)" <gi...@apache.org> on 2023/06/29 01:39:40 UTC
[GitHub] [shardingsphere] lklogs opened a new issue, #26678: ShardingProxy Base transaction mode, "Select for update" execution exception
lklogs opened a new issue, #26678:
URL: https://github.com/apache/shardingsphere/issues/26678
## current environment
- ShardingProxy + Base
- Sharding Proxy:5.3.2
- Seata:1.6.1
- PostgreSQL:13.2
## Steps to reproduce
Open a transaction, execute the select for update statement, and ERROR: portal "C_n" does not exist appears. The steps to reproduce are as follows:
```bash
sharding_db=> begin;
BEGIN
sharding_db=*> select * from ticket where id=1 for update;
ERROR: portal "C_4" does not exist
sharding_db=!> rollback;
```
## Exception Details
```sql
[INFO ] 2023-06-28 18:25:29.725 [Connection-1-ThreadExecutor] i.s.tm.api.DefaultGlobalTransaction - Begin new global transaction [192.168.2.73:8091:5215575959221506544]
[INFO ] 2023-06-28 18:25:32.116 [Connection-1-ThreadExecutor] ShardingSphere-SQL - Logic SQL: select * from ticket where id=1 for update
[INFO ] 2023-06-28 18:25:32.116 [Connection-1-ThreadExecutor] ShardingSphere-SQL - Actual SQL: ds_0 ::: select * from ticket where id=1 for update
[ERROR] 2023-06-28 18:25:32.153 [Connection-1-ThreadExecutor] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
org.postgresql.util.PSQLException: ERROR: portal "C_2" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
at org.postgresql.core.v3.QueryExecutorImpl.fetch(QueryExecutorImpl.java:2562)
at org.postgresql.jdbc.PgResultSet.next(PgResultSet.java:2145)
at com.zaxxer.hikari.pool.HikariProxyResultSet.next(HikariProxyResultSet.java)
at org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.type.stream.JDBCStreamQueryResult.next(JDBCStreamQueryResult.java:53)
at org.apache.shardingsphere.sharding.merge.common.IteratorStreamMergedResult.next(IteratorStreamMergedResult.java:41)
at org.apache.shardingsphere.proxy.backend.connector.DatabaseConnector.next(DatabaseConnector.java:416)
at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.simple.PostgreSQLComQueryExecutor.next(PostgreSQLComQueryExecutor.java:122)
at org.apache.shardingsphere.proxy.frontend.postgresql.command.PostgreSQLCommandExecuteEngine.writeDataPackets(PostgreSQLCommandExecuteEngine.java:107)
at org.apache.shardingsphere.proxy.frontend.postgresql.command.PostgreSQLCommandExecuteEngine.processSimpleQuery(PostgreSQLCommandExecuteEngine.java:94)
at org.apache.shardingsphere.proxy.frontend.postgresql.command.PostgreSQLCommandExecuteEngine.writeQueryData(PostgreSQLCommandExecuteEngine.java:85)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.doExecuteCommand(CommandExecutorTask.java:120)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:109)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:77)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
[INFO ] 2023-06-28 18:25:34.270 [Connection-1-ThreadExecutor] i.s.tm.api.DefaultGlobalTransaction - Suspending current transaction, xid = 192.168.2.73:8091:5215575959221506544
[INFO ] 2023-06-28 18:25:34.271 [Connection-1-ThreadExecutor] i.s.tm.api.DefaultGlobalTransaction - [192.168.2.73:8091:5215575959221506544] rollback status: Rollbacked
```
## Comparison with other modes
Normal performance in LOCAL mode and Atomikos XA mode
![Untitled](https://github.com/apache/shardingsphere/assets/39233498/d1c5419a-6e6b-47c3-9e12-7e617f40532d)
--
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] github-actions[bot] commented on issue #26678: ShardingProxy Base transaction mode, "Select for update" execution exception
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #26678:
URL: https://github.com/apache/shardingsphere/issues/26678#issuecomment-1656865781
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org