if value of binlog pause status in zk is empty, dble report ArrayIndexOutOfBoundsException (#1837)

This commit is contained in:
Collapsar
2020-04-30 14:13:01 +08:00
committed by yanhuqing
parent 7ae5f55e24
commit 035f08064b

View File

@@ -91,7 +91,7 @@ public class OfflineStatusListener implements PathChildrenCacheListener {
CuratorFramework zkConn = ZKUtils.getConnection();
try {
byte[] binlogStatusData = zkConn.getData().forPath(binlogStatusPath);
if (binlogStatusData == null) {
if (binlogStatusData == null || binlogStatusData.length == 0) {
return;
}
String data = new String(binlogStatusData, StandardCharsets.UTF_8);