Skip to content

Conversation

@maochongxin
Copy link
Contributor

@maochongxin maochongxin commented Nov 27, 2024

Summary

This feature primarily implements a single-tablet refresh mechanism for table location and adds some retry mechanisms to support the auto-splitting feature.

Solution Description

  • The table location management in 4.x is separated and managed independently using ObPartitionLocationInfo, with index management based on tablet IDs in ObPartitionEntry.
  • The refresh of metadata and the refresh of location are decoupled into two phases. When a routing change is encountered, the location information is refreshed at a single-tablet granularity.
  • A retry mechanism has been added to refresh the entire table entry for certain error codes and appropriately handle requests that require retries (e.g., splitting and recombining batches) to ensure the reliability and correctness of the retries.

@maochongxin maochongxin force-pushed the feature/route-single-partition-refresh branch 2 times, most recently from cb8be8e to 73569e8 Compare December 10, 2024 11:13
@maochongxin maochongxin force-pushed the feature/route-single-partition-refresh branch from c8b1682 to 0954f28 Compare December 17, 2024 02:44
@maochongxin maochongxin force-pushed the feature/route-single-partition-refresh branch 2 times, most recently from b7f625a to 0899fea Compare January 2, 2025 09:15
maochongxin and others added 25 commits January 3, 2025 15:16
Enhance Client Support for Partition Splitting
…uery (#213)

* remove lock in refreshTableLocationByTabletId

* fix refresh sql

* fix refresh interval

* add retry logic for common query

* add retry logic for executeMutation

* add retry logic for executeMutation

* add retry logic for ObTableQueryAndMutateRequest

* fix: correct ineffective retry logic

* retry logic for ObTableClient execute

* fix

* fix
* add threshold for refresh table entry with location

* [Fix] remove TABLE_ENTRY_LOCATION_REFRESH_THRESHOLD in Property

* [Fix] fix compile error

---------

Co-authored-by: shenyunlong.syl <shenyunlong.syl@oceanbase.com>
* fix global index route refresh wrong when route need refresh

* fix global index route wrong

* revert unused commit
* fix global index route wrong when need partial route refresh

* Ensure PartitionInfo is Exposed Only After Leader is Found During Single Shard Refresh

---------

Co-authored-by: maochongxin <maochongxin@gmail.com>
@maochongxin maochongxin force-pushed the feature/route-single-partition-refresh branch from 0899fea to 83312c3 Compare January 3, 2025 07:16
@shenyunlong
Copy link
Contributor

LGTM

@shenyunlong shenyunlong merged commit bd246ea into master Jan 3, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants