View change helper functions
- Mar 11, 2025
-
-
Christian Thomas Knab authored
-
- Mar 10, 2025
-
-
Christian Thomas Knab authored
-
added helper functions for sharding. this is kind of how it looks like.
please feel free to modify anything or ask me to change something.
also oops i just realized my formatter changed way too much in containers.py...
with KVSTestFixture(conductor, dir, log, node_count=4) as fx:
c = KVSMultiClient(fx.clients, "client", log)
conductor.add_shard("shard1", conductor.get_nodes(0, 2))
fx.broadcast_view(conductor.get_shard_view())
# examples of modifying shards
conductor.add_shard("shard2", conductor.get_nodes(2, 3))
conductor.add_node_to_shard("shard2", conductor.get_node(3))
conductor.remove_node_from_shard("shard1", conductor.get_node(0))
conductor.remove_shard("shard1")