Skip to content
Snippets Groups Projects
  • Iustin Pop's avatar
    hscan: fix long-standing bug with node memory data · 693342ad
    Iustin Pop authored
    
    There is a long-standing bug in hscan, due to the serialization
    workflow. Basically, hscan loads data from the remote cluster(s),
    processes it via Loader.mergeData and Loader.checkData, then
    serializes it. The Loader function will update the node memory values
    as if the down instances were running, and then hscan saves the
    _modified_ values.
    
    When another program (e.g. hbal) loads the text files, it will
    re-apply the Loader functions, in effect subtracting the instance
    memory twice, which is course offers a wrong cluster view.
    
    To fix this bug, we change a bit the internal workflow in hscan, so
    that we serialize the unmodified cluster data, and only use the
    modified one for the display of cluster state (and verification that
    yes, we can load the data).
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
    693342ad