Skip to content

Commit 72644fe

Browse files
committed
set dirty in normal batch if observer down; use tableEntryRefreshLockTimeout to block refreshing rs
1 parent 1596005 commit 72644fe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/com/alipay/oceanbase/rpc/ObTableClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ public void resetExecuteContinuousFailureCount(String tableName) {
850850
public void syncRefreshMetadata(boolean forceRenew) throws Exception {// do not refresh within 5 seconds even if forceRenew
851851
checkStatus();
852852
long lastRefreshMetadataTimestamp = tableRoute.getLastRefreshMetadataTimestamp();
853-
if (System.currentTimeMillis() - lastRefreshMetadataTimestamp < 5000L) {
853+
if (System.currentTimeMillis() - lastRefreshMetadataTimestamp < tableEntryRefreshLockTimeout) {
854854
logger
855855
.warn(
856856
"have to wait for more than 5 seconds to refresh metadata, it has refreshed at: {}",
@@ -878,7 +878,7 @@ public void syncRefreshMetadata(boolean forceRenew) throws Exception {// do not
878878
}
879879
try {
880880
// double check timestamp
881-
if (System.currentTimeMillis() - lastRefreshMetadataTimestamp < 5000L) {
881+
if (System.currentTimeMillis() - lastRefreshMetadataTimestamp < tableEntryRefreshLockTimeout) {
882882
logger
883883
.warn(
884884
"have to wait for more than 5 seconds to refresh metadata, it has refreshed at: {}",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ public void partitionExecute(ObTableOperationResult[] results,
456456
&& ((ObTableTransportException) ex).getErrorCode() == TransportCodes.BOLT_TIMEOUT) {
457457
obTableClient.syncRefreshMetadata(true);
458458
obTableClient.refreshTableLocationByTabletId(tableName, partId);
459+
subObTable.setDirty();
459460
}
460461
obTableClient.calculateContinuousFailure(tableName, ex.getMessage());
461462
throw ex;

0 commit comments

Comments
 (0)