Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

feat(split-client): c++ client split related implementation #798

Merged
merged 4 commits into from
May 19, 2021

Conversation

hycdong
Copy link
Contributor

@hycdong hycdong commented Mar 25, 2021

This pull request contains c++ client partition split related implementation, including:

  1. handle split related error code: ERR_SPLITTING, ERR_PARENT_PARTITION_MISUSED
  • when parent partition is registering child partition, it will reject read write requests by return ERR_SPLITTING, client won't query meta and will retry in remaining time
  • when child partition is active, the request should be sent to child, parent will return ERR_PARENT_PARTITION_MISUSED, client should update all partitions config to update both parent and child config
  1. handle the condition that client query config for a splitting table
  • when client query config for a splitting table, it will get child partition config, if child is not ready, its requests should be redirected to parent
  • it is a valid case that client header gpid is different from result gpid, update check in function call_task, not assert when gpid changed
  1. handle app partition_count changed while query meta
  • in pervious implementation, if partition_count changed, client will core. Now server support split (new_count = old_count*2) and cancel split (new_count = old_count / 2), client should not assert in those cases.

@Smityz
Copy link
Contributor

Smityz commented May 11, 2021

LGTM

@levy5307 levy5307 merged commit 2c84041 into XiaoMi:master May 19, 2021
@hycdong hycdong deleted the split_client branch July 30, 2021 10:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants