Skip to content

Commit

Permalink
fix #452
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Nov 20, 2017
1 parent bce237f commit 3c27db2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### 缺陷修正

1. [ISSUE #436](https://github.com/shardingjdbc/sharding-jdbc/issues/436) 读写分离多从库配置RoundRobin算法并使用MyBatis时,只能路由到同一从库
1. [ISSUE #452](https://github.com/shardingjdbc/sharding-jdbc/issues/452) DDL语句分片至多个表会造成连接泄漏的问题

## 2.0.0.M2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ public Collection<Connection> getAllConnections(final String dataSourceName) thr
dataSources = new HashMap<>(1, 1);
dataSources.put(dataSourceName, dataSource);
}

Collection<Connection> result = new LinkedList<>();
for (Entry<String, DataSource> entry : dataSources.entrySet()) {
Connection connection = entry.getValue().getConnection();
Connection connection = getCachedConnections().containsKey(entry.getKey()) ? getCachedConnections().get(entry.getKey()) : entry.getValue().getConnection();
replayMethodsInvocation(connection);
getCachedConnections().put(entry.getKey(), connection);
result.add(connection);
Expand Down

0 comments on commit 3c27db2

Please sign in to comment.