Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Fix Version/s: 1.1.1
    • Component/s: Core
    • Labels:
      None

      Description

      Right now when moving a node we set the OperationMode only once we've calculated the necessary ranges to transfer and if there actually are ranges to transfer. Due to the sleep for ring settling this means there are 30 seconds where the node is moving but the operation mode isn't set accordingly. Additionally if it turns out no data needs to be transferred then the move will complete without ever switching the OperationMode to moving.

      1. 4252.txt
        2 kB
        Jonathan Ellis

        Activity

        Hide
        Jonathan Ellis added a comment -

        committed

        Show
        Jonathan Ellis added a comment - committed
        Hide
        Nick Bailey added a comment -

        +1

        Show
        Nick Bailey added a comment - +1
        Hide
        Jonathan Ellis added a comment -

        Patch attached.

        Show
        Jonathan Ellis added a comment - Patch attached.
        Hide
        Nick Bailey added a comment -

        Ah you are right. I was under the impression we did the RING_DELAY sleep no matter what, but apparently not.

        Regarding the 'fetching new ranges...' log message, we can call setMode multiple times (a pattern we use for other modes). So we can just call setMode earlier on with a more accurate log message in addition to the later call.

        Show
        Nick Bailey added a comment - Ah you are right. I was under the impression we did the RING_DELAY sleep no matter what, but apparently not. Regarding the 'fetching new ranges...' log message, we can call setMode multiple times (a pattern we use for other modes). So we can just call setMode earlier on with a more accurate log message in addition to the later call.
        Hide
        Jonathan Ellis added a comment -

        just nicer to set the mode immediately so that when a move is initiated the operation mode of the node changes immediately rather than waiting 30ish seconds

        Fair enough.

        in the admittedly uncommon case of no data being transferred the operation mode gets set to moving at all

        I think it's inside that check to avoid logging "fetching new ranges and streaming old ranges" when there's nothing to stream, which is also misleading.

        Since we don't "push" modes I don't think there's any difference between not setting it at all, and setting it only to set back to NORMAL a nanosecond later.

        Show
        Jonathan Ellis added a comment - just nicer to set the mode immediately so that when a move is initiated the operation mode of the node changes immediately rather than waiting 30ish seconds Fair enough. in the admittedly uncommon case of no data being transferred the operation mode gets set to moving at all I think it's inside that check to avoid logging "fetching new ranges and streaming old ranges" when there's nothing to stream, which is also misleading. Since we don't "push" modes I don't think there's any difference between not setting it at all, and setting it only to set back to NORMAL a nanosecond later.
        Hide
        Nick Bailey added a comment -

        From a monitoring application perspective its just nicer to set the mode immediately so that when a move is initiated the operation mode of the node changes immediately rather than waiting 30ish seconds. Also so in the admittedly uncommon case of no data being transferred the operation mode gets set to moving at all, which it currently won't.

        Show
        Nick Bailey added a comment - From a monitoring application perspective its just nicer to set the mode immediately so that when a move is initiated the operation mode of the node changes immediately rather than waiting 30ish seconds. Also so in the admittedly uncommon case of no data being transferred the operation mode gets set to moving at all, which it currently won't.
        Hide
        Jonathan Ellis added a comment -

        What difference does it make as long as we set MOVING before streamRanges / requestRanges?

        Show
        Jonathan Ellis added a comment - What difference does it make as long as we set MOVING before streamRanges / requestRanges?

          People

          • Assignee:
            Jonathan Ellis
            Reporter:
            Nick Bailey
            Reviewer:
            Nick Bailey
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development