Skip to content

Commit 28c8819

Browse files
sunsun314yanhuqing666
authored andcommitted
#1476 add size check and change disable flag checked (#1511)
1 parent 24b4a4e commit 28c8819

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/actiontech/dble/backend/datasource/PhysicalDNPoolSingleWH.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public Map<Integer, PhysicalDatasource[]> getStandbyReadSourcesMap() {
182182
@Override
183183
void getRWBalanceCon(String schema, boolean autocommit, ResponseHandler handler, Object attachment) throws Exception {
184184
PhysicalDatasource theNode = getRWBalanceNode();
185-
if (theNode.getConfig().isDisabled()) {
185+
if (theNode.isDisabled()) {
186186
if (this.getReadSources().values().size() > 0) {
187187
theNode = this.getReadSources().values().iterator().next()[0];
188188
} else {

src/main/java/com/actiontech/dble/config/util/SchemaWriteJob.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private void changeHostInfo(DataHost dh, PhysicalDNPoolSingleWH physicalDNPoolSi
7878
}
7979

8080
List<ReadHost> newReadList = new ArrayList<ReadHost>();
81-
if (physicalDNPoolSingleWH.getReadSourceAll() != null) {
81+
if (physicalDNPoolSingleWH.getReadSourceAll().size() > 0) {
8282
for (PhysicalDatasource rs : physicalDNPoolSingleWH.getReadSourceAll().get(0)) {
8383
ReadHost r = new ReadHost();
8484
r.setDisabled("" + rs.isDisabled());

0 commit comments

Comments
 (0)