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

同一个connection不能同时执行两次查询,ResultSet会报错 #23

Closed
pingww opened this issue Feb 29, 2016 · 2 comments
Closed

Comments

@pingww
Copy link

pingww commented Feb 29, 2016

// 如果同时查询一个数据源上面两个分表,
// 则此处复用了同一个connection,结果集ResultSet会报错,应该新建connection
if (connectionMap.containsKey(dataSourceName)) { ???
return connectionMap.get(dataSourceName);
}

@pingww pingww closed this as completed Feb 29, 2016
@hanahmily
Copy link
Contributor

同时查询一个数据源上的两个分表不会报错的。测试用例com.dangdang.ddframe.rdb.integrate.db.SelectShardingDataBasesOnlyTest中有测试一个数据源多个分表的情况。如果有问题请给出测试代码。谢谢

@pingww
Copy link
Author

pingww commented Mar 1, 2016

不要意思,是我自己动态数据源组内部并发问题,不过一个数据源只有一个连接,多个分表查询并发上不去

terrymanu pushed a commit that referenced this issue Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants