Skip to content

Commit

Permalink
#1476 add size check and change disable flag checked (#1511)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsun314 authored and yanhuqing666 committed Nov 20, 2019
1 parent 24b4a4e commit 28c8819
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public Map<Integer, PhysicalDatasource[]> getStandbyReadSourcesMap() {
@Override
void getRWBalanceCon(String schema, boolean autocommit, ResponseHandler handler, Object attachment) throws Exception {
PhysicalDatasource theNode = getRWBalanceNode();
if (theNode.getConfig().isDisabled()) {
if (theNode.isDisabled()) {
if (this.getReadSources().values().size() > 0) {
theNode = this.getReadSources().values().iterator().next()[0];
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private void changeHostInfo(DataHost dh, PhysicalDNPoolSingleWH physicalDNPoolSi
}

List<ReadHost> newReadList = new ArrayList<ReadHost>();
if (physicalDNPoolSingleWH.getReadSourceAll() != null) {
if (physicalDNPoolSingleWH.getReadSourceAll().size() > 0) {
for (PhysicalDatasource rs : physicalDNPoolSingleWH.getReadSourceAll().get(0)) {
ReadHost r = new ReadHost();
r.setDisabled("" + rs.isDisabled());
Expand Down

0 comments on commit 28c8819

Please sign in to comment.