Skip to content

Commit 02e2f8f

Browse files
committed
remove invalid table
1 parent 108afaf commit 02e2f8f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/com/alipay/oceanbase/rpc/location/model/TableRoster.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,13 @@ public List<ObServerAddr> refreshTablesAndGetNewServers(List<ReplicaLocation> ne
9090
newServers.add(addr);
9191

9292
// has ob table addr and this addr is valid, continue
93-
if (tables.containsKey(addr) && tables.get(addr).isValid()) {
94-
continue;
93+
if (tables.containsKey(addr)) {
94+
if (!tables.get(addr).isValid()) {
95+
ObTable oldTable = tables.remove(addr);
96+
oldTable.close();
97+
} else {
98+
continue;
99+
}
95100
}
96101

97102
ObTable obTable = new ObTable.Builder(addr.getIp(), addr.getSvrPort()) //

0 commit comments

Comments
 (0)