-
Notifications
You must be signed in to change notification settings - Fork 24
Refactor table routing process #310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 17 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
53cfe42
refactor table routing process for better capacity of disaster-recove…
JackShi148 f4dc038
fix schema version not updated in retry
JackShi148 d52ec3c
add log for table not exist in truncate
JackShi148 ce32274
rebase secondary_part master
JackShi148 c92cb1c
add log, add time check when refresh rsList
JackShi148 42dedc6
refresh tableEntry object when refreshing tablet location meeting sch…
JackShi148 74c6d98
enable get connection num in odp mode
JackShi148 2c8e02b
fix single observer do not retry
JackShi148 9239927
enable server version checking in odp mode
JackShi148 6c7477a
remove ls batch log
JackShi148 cbd1948
add ls_id refreshing log; refreshMeta retry uses tableEntryRefreshTry…
JackShi148 f6037ad
set refresh interval to 100ms from 300ms to ensure refreshing correct…
JackShi148 4718948
refresh tablet location to refresh leader observer when transport tim…
JackShi148 5ff49e3
rebase table master
JackShi148 11aa780
use runtimeMaxWait to keep refreshing table meta and tablet location …
JackShi148 fc3b3e9
use master refreshing interval; use runtimeMaxWait in batch execution
JackShi148 519f403
refresh batch tablet locations when drop table using lsbatch, use run…
JackShi148 c9076a6
add refresh metadata log
JackShi148 8a507cf
add valid flag to obTable to avoid unnecessary reconnect if observer …
JackShi148 368f921
set dirty if fail to reconnect
JackShi148 1d74b96
unify to check schema version and throw exception
JackShi148 bd6e7ff
use runtimeMaxWait to replace tryTimes in async stream result
JackShi148 1596005
set ThreadLocalMap HashMap to ConcurrentMap; check valid in executeWi…
JackShi148 72644fe
set dirty in normal batch if observer down; use tableEntryRefreshLock…
JackShi148 aab0f4a
optimize by review
JackShi148 942aec5
reset cached result in sync query init if need to refresh table meta;…
JackShi148 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2,471 changes: 460 additions & 2,011 deletions
2,471
src/main/java/com/alipay/oceanbase/rpc/ObTableClient.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
src/main/java/com/alipay/oceanbase/rpc/exception/ObTableSchemaVersionMismatchException.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| /*- | ||
| * #%L | ||
| * com.oceanbase:obkv-table-client | ||
| * %% | ||
| * Copyright (C) 2021 - 2025 OceanBase | ||
| * %% | ||
| * OBKV Table Client Framework is licensed under Mulan PSL v2. | ||
| * You can use this software according to the terms and conditions of the Mulan PSL v2. | ||
| * You may obtain a copy of Mulan PSL v2 at: | ||
| * http://license.coscl.org.cn/MulanPSL2 | ||
| * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, | ||
| * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, | ||
| * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. | ||
| * See the Mulan PSL v2 for more details. | ||
| * #L% | ||
| */ | ||
|
|
||
| package com.alipay.oceanbase.rpc.exception; | ||
|
|
||
| public class ObTableSchemaVersionMismatchException extends ObTableException { | ||
| /* | ||
| * Ob table schema version mismatch exception. | ||
| */ | ||
| public ObTableSchemaVersionMismatchException() { | ||
| } | ||
|
|
||
| /* | ||
| * Ob table schema version mismatch exception with error code. | ||
| */ | ||
| public ObTableSchemaVersionMismatchException(int errorCode) { | ||
| super(errorCode); | ||
| } | ||
|
|
||
| /* | ||
| * Ob table schema version mismatch exception with message and error code. | ||
| */ | ||
| public ObTableSchemaVersionMismatchException(String message, int errorCode) { | ||
| super(message, errorCode); | ||
| } | ||
|
|
||
| /* | ||
| * Ob table schema version mismatch exception with message. | ||
| */ | ||
| public ObTableSchemaVersionMismatchException(String message) { | ||
| super(message); | ||
| } | ||
|
|
||
| /* | ||
| * Ob table schema version mismatch exception with message and cause. | ||
| */ | ||
| public ObTableSchemaVersionMismatchException(String message, Throwable cause) { | ||
| super(message, cause); | ||
| } | ||
|
|
||
| /* | ||
| * Ob table schema version mismatch exception with case. | ||
| */ | ||
| public ObTableSchemaVersionMismatchException(Throwable cause) { | ||
| super(cause); | ||
| } | ||
| } |
61 changes: 61 additions & 0 deletions
61
src/main/java/com/alipay/oceanbase/rpc/exception/ObTableTryLockTimeoutException.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| /*- | ||
| * #%L | ||
| * com.oceanbase:obkv-table-client | ||
| * %% | ||
| * Copyright (C) 2021 - 2025 OceanBase | ||
| * %% | ||
| * OBKV Table Client Framework is licensed under Mulan PSL v2. | ||
| * You can use this software according to the terms and conditions of the Mulan PSL v2. | ||
| * You may obtain a copy of Mulan PSL v2 at: | ||
| * http://license.coscl.org.cn/MulanPSL2 | ||
| * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, | ||
| * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, | ||
| * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. | ||
| * See the Mulan PSL v2 for more details. | ||
| * #L% | ||
| */ | ||
|
|
||
| package com.alipay.oceanbase.rpc.exception; | ||
|
|
||
| public class ObTableTryLockTimeoutException extends ObTableException { | ||
| /* | ||
| * Ob table try lock timeout exception. | ||
| */ | ||
| public ObTableTryLockTimeoutException() { | ||
| } | ||
|
|
||
| /* | ||
| * Ob table try lock timeout exception. | ||
| */ | ||
| public ObTableTryLockTimeoutException(int errorCode) { | ||
| super(errorCode); | ||
| } | ||
|
|
||
| /* | ||
| * Ob table try lock timeout exception. | ||
| */ | ||
| public ObTableTryLockTimeoutException(String message, int errorCode) { | ||
| super(message, errorCode); | ||
| } | ||
|
|
||
| /* | ||
| * Ob table try lock timeout exception. | ||
| */ | ||
| public ObTableTryLockTimeoutException(String message) { | ||
| super(message); | ||
| } | ||
|
|
||
| /* | ||
| * Ob table try lock timeout exception. | ||
| */ | ||
| public ObTableTryLockTimeoutException(String message, Throwable cause) { | ||
| super(message, cause); | ||
| } | ||
|
|
||
| /* | ||
| * Ob table try lock timeout exception. | ||
| */ | ||
| public ObTableTryLockTimeoutException(Throwable cause) { | ||
| super(cause); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.