Skip to content
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

Add 'REDISTRIBUTE KEY RANGE' command #789

Open
wants to merge 50 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
6caa272
Add RedistributeKeyRange command to qdbCoordinator
EinKrebs Sep 26, 2024
b3f5cd0
Split tasks.TaskGroup into tasks.BalancerTask + tasks.MoveTaskGroup. …
EinKrebs Sep 26, 2024
1c4e8d9
Add RedistributeKeyRange to KeyRangeMgr
EinKrebs Sep 26, 2024
f8b1863
Fix moving the whole key range
EinKrebs Sep 27, 2024
21de695
RedistributeKeyRange->BatchMoveKeyRange
EinKrebs Sep 27, 2024
2f61538
Small refactoring
EinKrebs Sep 27, 2024
7fbb091
RedistributeKeyRange proto impl
EinKrebs Sep 27, 2024
f7677b6
Add RedistributeTask to proto
EinKrebs Sep 27, 2024
bf9ff36
Add RedistributeTask to QDB
EinKrebs Sep 27, 2024
16404f7
Add RedistributeTask type
EinKrebs Sep 27, 2024
f71e424
Add methods for redistribute tasks to QDB
EinKrebs Sep 27, 2024
1e0c3e6
Persistent execution of RedistributeKeyRange
EinKrebs Sep 27, 2024
ec905a5
Small fix
EinKrebs Sep 27, 2024
55d93a1
Refactoring
EinKrebs Sep 27, 2024
2e9ca75
Implemented RenameKeyRange
EinKrebs Sep 27, 2024
05f85bb
Add 'REDISTRIBUTE KEY RANGE' statement to gram
EinKrebs Sep 27, 2024
da69526
Add 'REDISTRIBUTE KEY RANGE' statement processing to console
EinKrebs Sep 27, 2024
0bc109f
Fix slicer build
EinKrebs Sep 27, 2024
5731c7b
Fix redistributing empty key range
EinKrebs Sep 30, 2024
e538269
Fix RenameKeyRange in MemQDB
EinKrebs Oct 2, 2024
c4b5a17
Fixes
EinKrebs Oct 2, 2024
c4587fc
More checks in RedistributeKeyRange
EinKrebs Oct 2, 2024
ffd898a
Fix
EinKrebs Oct 2, 2024
39a2623
Implement BalancerTaskServiceServer's
EinKrebs Oct 2, 2024
9ef0475
Fix converter functions
EinKrebs Oct 4, 2024
301c9b2
Fix `BalancerTaskServiceServer`s
EinKrebs Oct 4, 2024
84a37ac
Fixes in BatchMoveKeyRange
EinKrebs Oct 4, 2024
cfcdad8
ADd working with BalancerTasks in balancer
EinKrebs Oct 4, 2024
e0dab96
Fix balancer.feature
EinKrebs Oct 4, 2024
53e0801
Add redistribute.feature
EinKrebs Oct 4, 2024
3507aae
Fix redistribute.feature Feature name
EinKrebs Oct 4, 2024
702276c
Implement GetShard in qdbCoordinator
EinKrebs Oct 4, 2024
f05cf00
Fix feature
EinKrebs Oct 4, 2024
2d68d88
Add retries to RunCoordinator
EinKrebs Oct 4, 2024
5bc1358
Some fixes & docstrings
EinKrebs Oct 22, 2024
7430dee
Add new test for balancer
EinKrebs Oct 22, 2024
92df6a4
Fix moving whole range in BatchMoveKeyRange
EinKrebs Oct 22, 2024
9a397e0
Refactor balancer.feature
EinKrebs Oct 22, 2024
6a70c15
Clean up code
EinKrebs Oct 22, 2024
7a3c727
Refactor comment
EinKrebs Oct 22, 2024
8606ba9
Improve docstrings
EinKrebs Oct 22, 2024
6d8d32a
Prefer replicas when gathering info about data on shards
EinKrebs Oct 23, 2024
6480c3d
Fix finishing balancer task in progress
EinKrebs Oct 23, 2024
0921c4d
Rename *TaskGroup methods of TaskMgr`s to *MoveTaskGroup
EinKrebs Oct 23, 2024
444849c
Rename *TaskGroup methods of QDBs to *MoveTaskGroup
EinKrebs Oct 23, 2024
7af7a99
Fix linter
EinKrebs Oct 23, 2024
bed0b17
Fix spqrerror.Newf call
EinKrebs Oct 23, 2024
4f934e5
Fix feature tests
EinKrebs Oct 24, 2024
9c1aef6
Update psql message for redistribute command
EinKrebs Oct 31, 2024
48f9edb
Add regression test for redistribute command
EinKrebs Oct 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
311 changes: 76 additions & 235 deletions balancer/provider/balancer.go

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion coordinator/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ func (app *App) ServeGrpcApi(wg *sync.WaitGroup) error {
protos.RegisterTopologyServiceServer(serv, topServ)
protos.RegisterShardServiceServer(serv, shardServ)
protos.RegisterDistributionServiceServer(serv, dsServ)
protos.RegisterTasksServiceServer(serv, tasksServ)
protos.RegisterMoveTasksServiceServer(serv, tasksServ)
protos.RegisterBalancerTaskServiceServer(serv, tasksServ)

address := net.JoinHostPort(config.CoordinatorConfig().Host, config.CoordinatorConfig().GrpcApiPort)
listener, err := net.Listen("tcp", address)
Expand Down
Loading
Loading