Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: Marathon 1.6.322
    • Component/s: Leader Election
    • Labels:
      None

      Description

      Previously, when Marathon received an abdication request, it waited for 500ms before doing abdication in order to give enough time to Marathon to send a response and a client to consume it. The leader election part of Marathon was recently rewritten, and this logic went away. It needs to be brought back to life again. A relevant excerpt from the code, showing that abdication happens immediately upon a request receive:

          override def cancel(): Boolean = synchronized {
            require(isStarted, "not started")
            if (!_isCancelled) {
              clientCloseable.removeBeforeClose(closeHook)
              _isCancelled = true
              // shutdown hook remove will throw if already shutting down; swallow the exception and continue.
      
              try {
                logger.info("Closing leader latch")
                latch.close()
                logger.info("Leader latch closed")
              } catch {
                case ex: Throwable =>
                  logger.error("Error closing CuratorElectionStream latch", ex)
              }
              Try(sq.complete()) // if not already completed
            }
            _isCancelled
          }
      

        Attachments

          Activity

            People

            • Assignee:
              tharper Tim Harper
              Reporter:
              ivanchernetsky Ivan Chernetsky
              Team:
              Orchestration Team
              Watchers:
              Artem Harutyunyan, daltonmatos, Ivan Chernetsky, Kevin Klues (Inactive), Tim Harper
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: