Skip to content

Commit 082d75a

Browse files
committed
retry one time in odp mode when query with part id
1 parent d532842 commit 082d75a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@ private AbstractQueryStreamResult commonExecute(InitQueryResultCallback<Abstract
187187
if (((ObTableException) e).getErrorCode() == ResultCodes.OB_NOT_SUPPORTED.errorCode) {
188188
// current ODP version does not support get partition meta information
189189
throw new FeatureNotSupportedException("current ODP version does not support query with part id", e);
190+
} else if (((ObTableException) e).getErrorCode() == ResultCodes.OB_ERR_KV_ROUTE_ENTRY_EXPIRE.errorCode) {
191+
// retry one time with force-renew flag
192+
ObPair<Long, ObTableParam> odpTable = obTableClient.getODPTableWithPartId(
193+
tableName, getPartId(), true);
194+
partitionObTables.put(odpTable.getLeft(), odpTable);
195+
} else {
196+
throw e;
190197
}
191198
} else {
192199
throw e;

0 commit comments

Comments
 (0)