Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5/5] Add Async MultiplexedClusterConnection #640

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Commits on Aug 23, 2022

  1. cluster_client: implement proper builder pattern

    - implement proper builder pattern by adding `new` & `builder` methods to ClusterClient and `new` & `build` methods to ClusterClientBuilder
    - deprecate & redirect `open` methods for ClusterClient & ClusterClientBuilder
    - move build method to ClusterClientBuilder
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    84349bb View commit details
    Browse the repository at this point in the history
  2. cluster_client: use ClusterParams struct to pass params

    - this is to simplify passing multiple params to & inside ClusterConnection impl
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    b5ec28e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    79fe0ff View commit details
    Browse the repository at this point in the history
  4. cluster: simplify TlsMode logic and add tls_insecure param

    - use plain host:port node naming, even for TLS as the tls mode/insecure flag will always be the same for all connections
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    44a3de6 View commit details
    Browse the repository at this point in the history
  5. cluster: refactor connect & create_initial_connections

    - move the connect method inside impl
    - create new Connection directly instead of creating a Client first
    - convert to methods & use required params from self instead of passing
    - set connections within create_initial_connections & call refresh_slots
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    77025aa View commit details
    Browse the repository at this point in the history
  6. cluster: keep all params in ClusterParams struct & use it to pass all…

    … cluster related params
    
    - remove unnecessary RefCell from params
    - this is to simplify passing multiple params to & inside the impl
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    dee0504 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a12d245 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    24544d4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    34a8613 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    cb94250 View commit details
    Browse the repository at this point in the history
  11. cluster: move slots response parsing logic to get_slots function

    - rename get_slots to parse_slots_response
    - move coverage checks & Slot creation logic into this fn
    - move CLUSTER SLOTS query logic out of this fn
    
    - this to easily reuse this function in the Async impl
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    ad326cb View commit details
    Browse the repository at this point in the history
  12. cluster: remove random connection logic

    - since we only operate in 100% slot coverage scenarios, there is no point in maintaining random connection logic, which is supposed to help us find missing nodes in the cluster topology
    - this also allows us to remove RefCell around connections & slots
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    0033457 View commit details
    Browse the repository at this point in the history
  13. cluster: remove RefCell for connections/slot

    - there is no point in using RefCell anymore
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    5d14992 View commit details
    Browse the repository at this point in the history
  14. cluster: consolidate routing logic into Routable trait

    - this is to reuse the routing logic within ClusterConnection and also reuse it in async impl
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    e943189 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    9d744d3 View commit details
    Browse the repository at this point in the history
  16. cluster: consolidate logic for create_initial_connections & refresh_s…

    …lots
    
    - set write/read timeouts just after creating connection
    - consolidate logic for create_initial_connections & refresh_slots connection creating/updating part into refresh_connections
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    1088805 View commit details
    Browse the repository at this point in the history
  17. cluster: directly expose Slot fields instead of bare methods

    - there is no point in having unnecessary indirection
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    0b9cb6b View commit details
    Browse the repository at this point in the history
  18. cluster: merge send_all_commands & recv_all_commands

    - there is no point in having 2 different functions
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    14f6d33 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    5bfa0a6 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    de8a514 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    d4608c3 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    0884896 View commit details
    Browse the repository at this point in the history
  23. cluster: use common pipeline instead of separate ClusterPipeline

    - remove ClusterPipeline & add re-exports for Pipeline/pipe
    - use `req_pipeline` instead of the packed version to avoid unpacking again for cluster
    - move cluster-specific pipeline checks into the new req_pipeline trait function
    utkarshgupta137 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    7d5aca7 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    9968153 View commit details
    Browse the repository at this point in the history