Skip to content

Conversation

apetenchea
Copy link
Member

This PR adds the following functionality to the Cluster class:

  • calculate_imbalance (GET /_admin/cluster/rebalance) - used for getting the current cluster imbalance
  • rebalance (PUT /_admin/cluster/rebalance) - used for rebalancing the shard distribution (calculates and then executes a rebalancing plan)
  • calculate_rebalance_plan (POST /_admin/cluster/rebalance) - calculates (but does not execute) a rebalancing plan
  • execute_rebalancing_plan (POST /_admin/cluster/rebalance/execute) - executes an already calculated rebalancing plan

A small documentation example has been added, together with the unit tests.

For reference, see the Rebalancing Section of the official documentation.

@codecov-commenter
Copy link

Codecov Report

Merging #287 (3a7d0df) into main (744a6e9) will decrease coverage by 0.41%.
Report is 17 commits behind head on main.
The diff coverage is 94.65%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@ Coverage Diff @@ ## main #287 +/- ## ========================================== - Coverage 99.01% 98.60% -0.41%  ========================================== Files 26 26 Lines 3958 4014 +56 ========================================== + Hits 3919 3958 +39  - Misses 39 56 +17 
Files Changed Coverage Δ
arango/client.py 98.41% <ø> (ø)
arango/http.py 100.00% <ø> (ø)
arango/collection.py 97.41% <92.92%> (-1.09%) ⬇️
arango/cluster.py 100.00% <100.00%> (ø)
arango/database.py 99.73% <100.00%> (-0.13%) ⬇️
arango/exceptions.py 100.00% <100.00%> (ø)
arango/request.py 94.44% <100.00%> (ø)
arango/utils.py 87.50% <100.00%> (-12.50%) ⬇️

... and 2 files with indirect coverage changes

@apetenchea apetenchea added the Ready to Merge Pull request is ready to merge label Sep 15, 2023
@aMahanna aMahanna self-requested a review September 18, 2023 12:51
@apetenchea apetenchea merged commit 0729f20 into main Sep 18, 2023
@apetenchea apetenchea deleted the feature/de-666-cluster-rebalance branch September 18, 2023 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ArangoDB 3.11 Ready to Merge Pull request is ready to merge

3 participants