Skip to content
  • Iustin Pop's avatar
    Change internal RPC client body values · d9de612c
    Iustin Pop authored
    
    
    Currently, all RPC payloads sent by the client to the remote node
    daemons must be identical, due to how the data is passed
    internally. This is deficient in both use (from the programmer's point
    of view) and from the network traffic (cluster verify/disk data
    gathering has a total payload which is O(n²) in size of the nodes
    being queried, instead of O(n)).
    
    This patch changes the RPC internals so that we always pass
    dictionaries indexed by target node name. For the default use case,
    when the payload is identical, we only serialise the payload once, so
    the extra overhead is just a dict with the node names and values all
    pointing to the same object. For different payloads, we will encode
    the body multiple times, but hopefully the bodies will be smaller.
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
    d9de612c