Skip to content

Commit 368f921

Browse files
committed
set dirty if fail to reconnect
1 parent 8a507cf commit 368f921

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/com/alipay/oceanbase/rpc/table/ObTable.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,10 @@ public ObPayload execute(final ObPayload request) throws RemotingException,
424424
connection.checkStatus();
425425
} catch (ConnectException ex) {
426426
// cannot connect to ob server, need refresh table location
427+
setDirty();
427428
throw new ObTableServerConnectException(ex);
428429
} catch (ObTableServerConnectException ex) {
430+
setDirty();
429431
throw ex;
430432
} catch (Exception ex) {
431433
throw new ObTableConnectionStatusException("check status failed, cause: " + ex.getMessage(), ex);
@@ -488,8 +490,10 @@ public ObPayload executeWithConnection(final ObPayload request,
488490
connection.checkStatus();
489491
} catch (ConnectException ex) {
490492
// Cannot connect to ob server, need refresh table location
493+
setDirty();
491494
throw new ObTableServerConnectException(ex);
492495
} catch (ObTableServerConnectException ex) {
496+
setDirty();
493497
throw ex;
494498
} catch (Exception ex) {
495499
throw new ObTableConnectionStatusException("check status failed, cause: " + ex.getMessage(), ex);

0 commit comments

Comments
 (0)