Skip to content

Commit f040f16

Browse files
committed
[Fix] remove TABLE_ENTRY_LOCATION_REFRESH_THRESHOLD in Property
1 parent f005f4b commit f040f16

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ private void initProperties() {
401401
routeMap.put(TABLE_ENTRY_ACQUIRE_CONNECT_TIMEOUT.getKey(), String.valueOf(tableEntryAcquireConnectTimeout));
402402
routeMap.put(TABLE_ENTRY_ACQUIRE_SOCKET_TIMEOUT.getKey(), String.valueOf(tableEntryAcquireSocketTimeout));
403403
routeMap.put(TABLE_ENTRY_REFRESH_INTERVAL_BASE.getKey(), String.valueOf(tableEntryRefreshIntervalBase));
404-
routeMap.put(TABLE_ENTRY_LOCATION_REFRESH_THRESHOLD.getKey(), String.valueOf(tableEntryLocationRefreshThreshold));
405404
routeMap.put(TABLE_ENTRY_REFRESH_INTERVAL_CEILING.getKey(), String.valueOf(tableEntryRefreshIntervalCeiling));
406405
routeMap.put(TABLE_ENTRY_REFRESH_TRY_TIMES.getKey(), String.valueOf(tableEntryRefreshTryTimes));
407406
}

src/main/java/com/alipay/oceanbase/rpc/location/LocationUtil.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747

4848
import static com.alipay.oceanbase.rpc.location.model.partition.ObPartitionKey.MAX_PARTITION_ELEMENT;
4949
import static com.alipay.oceanbase.rpc.location.model.partition.ObPartitionKey.MIN_PARTITION_ELEMENT;
50-
import static com.alipay.oceanbase.rpc.property.Property.TABLE_ENTRY_LOCATION_REFRESH_THRESHOLD;
5150
import static com.alipay.oceanbase.rpc.util.RandomUtil.getRandomNum;
5251
import static com.alipay.oceanbase.rpc.util.TableClientLoggerFactory.*;
5352
import static java.lang.String.format;
@@ -214,7 +213,8 @@ public class LocationUtil {
214213
private static final int TEMPLATE_PART_ID = -1;
215214

216215
// limit the size of get tableEntry location from remote each time
217-
private static final int MAX_TABLET_NUMS_EPOCH = 300;
216+
private static final int MAX_TABLET_NUMS_EPOCH = 300;
217+
private static final int TABLE_ENTRY_LOCATION_REFRESH_THRESHOLD = 100;
218218

219219
private abstract static class TableEntryRefreshWithPriorityCallback<T> {
220220
abstract T execute(ObServerAddr obServerAddr) throws ObTableEntryRefreshException;
@@ -747,7 +747,7 @@ private static TableEntry getTableEntryFromRemote(Connection connection, TableEn
747747

748748
if (ObGlobal.obVsnMajor() >= 4) {
749749
// only set empty partitionEntry
750-
if (tableEntry.getPartitionNum() <= TABLE_ENTRY_LOCATION_REFRESH_THRESHOLD.getDefaultLong()) {
750+
if (tableEntry.getPartitionNum() <= TABLE_ENTRY_LOCATION_REFRESH_THRESHOLD) {
751751
getTableEntryLocationFromRemote(connection, key, tableEntry);
752752
} else {
753753
ObPartitionEntry partitionEntry = new ObPartitionEntry();

src/main/java/com/alipay/oceanbase/rpc/property/Property.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ public enum Property {
5959
TABLE_ENTRY_ACQUIRE_SOCKET_TIMEOUT("table.entry.acquire.socket.timeout", 3000L,
6060
"刷新TABLE地址的SOCKET超时时间"),
6161

62-
TABLE_ENTRY_LOCATION_REFRESH_THRESHOLD("table.entry.location.refresh.threshold", 100L, "刷新TABLE ENTRY同时刷新LOCATION的阈值"),
63-
6462
TABLE_ENTRY_REFRESH_INTERVAL_BASE("table.entry.refresh.interval.base", 100L, "刷新TABLE地址的基础时间间隔"),
6563

6664
@Deprecated

0 commit comments

Comments
 (0)