Skip to content

Commit 96ae958

Browse files
committed
fix readhost only login
1 parent 29f7c79 commit 96ae958

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/com/actiontech/dble/config/ConfigInitializer.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ private void selfChecking0() throws ConfigException {
156156
private void checkWriteHost() {
157157
for (Map.Entry<String, PhysicalDBPool> pool : this.dataHosts.entrySet()) {
158158
PhysicalDatasource[] writeSource = pool.getValue().getSources();
159-
if (writeSource != null && writeSource.length != 0 && !writeSource[0].getConfig().isFake()) {
159+
if (writeSource != null && writeSource.length != 0) {
160+
if (writeSource[0].getConfig().isFake() && pool.getValue().getReadSources().isEmpty()) {
161+
continue;
162+
}
160163
this.dataHostWithoutWH = false;
161164
break;
162165
}

0 commit comments

Comments
 (0)