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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

1107 fix cluster conf sync wait loop #11897

Merged

Commits on Nov 8, 2023

  1. fix(cluster-rpc): boot from local config if table loaded

    When EMQX boots up, it tries to get latest config from peer (core type)
    nodes, if none of the nodes are replying, the node will decide
    to boot with local config (and replay the committed changes) if
    the commit table is loaded from disk locally (an indication of the
    data being latest), otherwise it will sleep for 1-2 seconds and
    retry.
    
    This lead to a race condition, e.g. in a two nodes cluster:
    
    1. node1 boots up
    2. node2 boots up and copy mnesia table from node1
    3. node1 restart before node2 can sync cluster.hocon from it
    4. node1 boots up and copy mnesia table from node2
    
    Now that both node1 and node2 has the mnesia `load_node` pointing
    to each other (i.e. not a local disk load).
    
    Prior to this fix, the nodes would wait for each other in a dead loop.
    
    This commit fixes the issue by allowing node to boot
    with local config if it does not have a lagging.
    zmstone committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    f9e9748 View commit details
    Browse the repository at this point in the history
  2. fix(emqx_conf_app): ensure log data fields

    Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
    zmstone and thalesmg committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    1e3500f View commit details
    Browse the repository at this point in the history