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

split: meta start partition split #286

Merged
merged 11 commits into from
Aug 6, 2019

Conversation

hycdong
Copy link
Contributor

@hycdong hycdong commented Jul 30, 2019

Simple partition split process

  1. meta receives client partition split request, and change partition count
  2. replica notices partition count changed during on_config_sync
  3. parent partitions create child partitions, child partitions async learn mutations and private logs from parents
  4. all child partitions in group finish learn process, parent will stop read and write
  5. meta server register child partitions
  6. child partition active, and parent recover read and write

More partition split discussion in issue #69
This pr solves the first step of partition split, which is bold in process description.

Main code logic

When meta server receives a partition split request:

  • meta will firstly validate parameters, including app status, partition count etc
  • if validation passed, meta will update new partition_count on zk
  • then update new partition_count on meta server locally
  • then create child partitions' partition_configuration structure locally, and we assume child partition init balliot = invalid_ballot(-1), which means the partition is currently invalid

Other explanations

  • add init_partition_count in app_info, it will be used when meta server failed during partition split, I will explain it in another new pull request
  • add unit tests for function ''app_partition_split"

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.

3 participants