Skip to content
This repository has been archived by the owner on Feb 15, 2018. It is now read-only.

Add startup lock support (general framework + tested etcd implementation) #98

Closed
wants to merge 5 commits into from

Commits on Oct 11, 2016

  1. Add startup lock support

    This required completely reworking startup sequence in `autocluster.erl`
    without making the existing dozen step sequence into an incomprehensible
    mess. Now steps are more independent and are executed in order with
    function that provides something like State + Either monads.
    
    Boot process is now split into 3 stages:
    - First stage roughly corresponds to original implementation
    - Second step is responsible for registering node in the backend. Also
      TTL timers are now started there, instead of spreading
      `-rabbit_boot_steps` through backend modules. This makes
      `autocluster.erl` the single source of truth about what is actually
      happening during startup.
    - Third stage is responsible for releasing startup lock. We need it
      because of `ignore` failure mode - we want the lock to be released
      even if some prior steps failed.
    
    During this rework it became evident that explicit mnesia:reset/0 is not
    needed (more thorough explanation is in comments for
    `autocluster:maybe_cluster/1`).
    
    Startup locking support should work the same way for every backend, but
    for now the only working implementation is for `etcd`. It even has some
    property-based tests =)
    Other backend fall back to original random delay behaviour.
    
    Also it looks like `dialyzer` ignores type specs in comments - because
    some of types there were definitely wrong, and converting to them to
    `-spec` caused a lot of barfing from `dialyzer`.
    binarin committed Oct 11, 2016
    Configuration menu
    Copy the full SHA
    1a8b010 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2016

  1. Configuration menu
    Copy the full SHA
    bc20fb6 View commit details
    Browse the repository at this point in the history
  2. Fix PropEr tests on travis

    binarin committed Nov 8, 2016
    Configuration menu
    Copy the full SHA
    6d3b6c4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    be370d4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    67506b8 View commit details
    Browse the repository at this point in the history