• Nirbhay Choubey's avatar
    MDEV#4109: Galera: Valgrind warnings "blocks are still · e4f5e49c
    Nirbhay Choubey authored
               reachable" in wsrep_init_startup on MTR tests
    
    The initialization & de-initialization of wsrep plugin is solely
    controlled by wsrep_on system variable. Now, as wsrep_on is ON by
    default, the plugin gets initialized during server start. However,
    there would be a leakage in case wsrep_on is turned off before plugin's
    deinitialization (while server is shutting down) takes place, in which
    case the deinit routine will not be invoked.
    
    In this particular case, wsrep_on is turned off as no wsrep provider
    has been specified & thus the valgrind warnings.
    
    Fixed by introducing a flag which tracks and now controls the
    (de|)initialization of the wsrep plugin instead on wsrep_on.
    Added necessary asserts.
    
    main.connect                             [ pass ]  16534
    valgrind_report                          [ pass ]
    e4f5e49c
wsrep_var.cc 15.8 KB