Skip to content

Add Rebalance-In, Rebalance-Out, Swap Rebalance#17

Open
chiragbytes7 wants to merge 7 commits into
couchbaselabs:mainfrom
chiragbytes7:rebalance-scenarios
Open

Add Rebalance-In, Rebalance-Out, Swap Rebalance#17
chiragbytes7 wants to merge 7 commits into
couchbaselabs:mainfrom
chiragbytes7:rebalance-scenarios

Conversation

@chiragbytes7

Copy link
Copy Markdown
Contributor

Increased the number of usable nodes to 4 in the makefile, 3 are part of the cluster and 1 is additional, to be used for rebalance-in and swap rebalance cases

Comment thread src/gorgon_couchbase/kv/rebalance_scenarios.go Outdated
Comment thread docker/gorgon_couchbase/Makefile Outdated
Comment thread docker/gorgon_couchbase/compose.yaml Outdated
Comment thread src/gorgon_couchbase/kv/rebalance_scenarios.go Outdated
Comment thread src/gorgon_couchbase/kv/rebalance_scenarios.go Outdated
@chiragbytes7 chiragbytes7 force-pushed the rebalance-scenarios branch 5 times, most recently from d2b7ead to 4532ac4 Compare April 27, 2026 11:54
@pavlosg pavlosg requested a review from Copilot April 28, 2026 15:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the Couchbase KV workload set with rebalance-in, rebalance-out, swap rebalance, and multi-node (sequential/bulk) rebalance scenarios, and updates the docker-compose generation to provision a 4th “additional” node intended for rebalance-in / swap-rebalance cases.

Changes:

  • Add new KV nemesis generators for rebalance-in/out/swap and additional sequential/bulk rebalance scenarios.
  • Introduce Options.AdditionalNode and adjust run command behavior to treat the last provided node as the additional node.
  • Switch docker compose.yaml to a generated artifact and increase generated node count to 4.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/gorgon_couchbase/kv/rebalance_scenarios.go New generator implementing rebalance-in/out/swap plus optional crash/partition follow-ups.
src/gorgon_couchbase/kv/additional_rebalance_scenarios.go New generator implementing sequential and bulk multi-node rebalance flows.
src/gorgon_couchbase/kv/db.go Adds new rebalance workloads and helper REST calls (addNode, findOrchestrator).
src/gorgon/interface.go Adds AdditionalNode to runtime options.
src/gorgon/cmd/main.go Splits last node into AdditionalNode for run.
docker/gorgon_couchbase/compose.yaml Removes committed compose file (now generated).
docker/gorgon_couchbase/Makefile Generates compose with 4 nodes.
docker/gorgon_couchbase/.gitignore Ignores generated compose.yaml.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/gorgon_couchbase/kv/rebalance_scenarios.go Outdated
Comment thread src/gorgon_couchbase/kv/additional_rebalance_scenarios.go
Comment thread src/gorgon_couchbase/kv/additional_rebalance_scenarios.go
Comment thread src/gorgon_couchbase/kv/db.go Outdated
Comment thread src/gorgon/cmd/main.go Outdated
Comment thread src/gorgon/interface.go Outdated
@chiragbytes7 chiragbytes7 force-pushed the rebalance-scenarios branch from dbd7b8c to a7dc48b Compare May 5, 2026 11:35
@pavlosg

pavlosg commented May 21, 2026

Copy link
Copy Markdown
Collaborator

I think it would be good to allow single-node tests but skip tests that require additional...

Right now you have one extra... could we consider a more flexible setup where we can add more than one node at once?

@chiragbytes7 chiragbytes7 force-pushed the rebalance-scenarios branch 2 times, most recently from fb152d3 to ea6093f Compare May 27, 2026 06:17
@chiragbytes7

Copy link
Copy Markdown
Contributor Author

provision for multiple additional nodes done in the commit - "Add Rebalance-In, Rebalance-Out, Swap Rebalance"
In latest commit -

  1. node passing to generator constructors during workload creation made dynamic
  2. added configuration validation for rebalance workloads

Comment thread src/gorgon/cmd/main.go Outdated
Comment thread src/gorgon_couchbase/kv/additional_rebalance_scenarios.go Outdated
Allowed specifying which process to crash, and which node to crash in case of a swap rebalance
Added a function wrapper for rest api call to get orchestrator node, followed by a workload for crashing the orchestrator mid rebalance
refactored to use 1 variadic argument in generator constructor for rebalance + network partition and 2 for rebalance + process crash
Also add config validation in rebalance_scenarios.go
@chiragbytes7 chiragbytes7 force-pushed the rebalance-scenarios branch from ea6093f to e4df317 Compare June 8, 2026 12:11
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.

3 participants