Skip to content

feat: make uuids truly random

Yaroslav Dynnikov requested to merge rosik/unique-uuids into master

Summary

  • feat: make uuids truly unique

    Up to this patch instance_uuid and replicaset_uuid were generated using name-based UUID v3. So all instances named i1 in all clusters had the same UUID.

    With this patch UUIDs become random v4. Particular UUID values are generated in two locations:

    1. start_boot (src/lib.rs)
    2. handle_join_request_and_wait -> build_instance (src/rpc/join.rs)

    Function Instance::new() is removed in favor of explicit struct construction.

  • test: refactor struct Instance inner tests

    The main purpose is to reduce the usage of Instance::new() function. It's going to be removed soon. No behavior changes are introduced yet.


  • Close #390 (closed)
  • Cherry-pick to: none
  • Docs follow-up: not necessary
Edited by Yaroslav Dynnikov

Merge request reports