Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 1.14 KB

code_considerations.md

File metadata and controls

11 lines (6 loc) · 1.14 KB

Code Considerations

Test Runner Logic

On going through the test_runner or runner_thread, one might think as to why did we use the a list to store a single value in the testStats[testResult] variable? The reason for doing so is based on how python works and the mutable nature of list object in python. Since, we don't have pointers in python we use the mutable nature of lists to modify the values of list by reference and use it across the functions. For reference, one can checkout this article on pointers-in-python

Creating new bricks for volume

In redant, the bricks for a volume are randomly assigned after calculating the unused servers and unused bricks in the cluster, such that the most optimal volume is created (when the volume is created by the framework). If all the bricks have been used up, then it starts from the beginning of the brick_roots (check config file for details) dictionary. Add/Replace/New Bricks follow the same naming structure i.e, brick/volume_name-brick_number.