Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-1938

Lock logic should wait for start level change to occur

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.9
    • Fix Version/s: 2.2.10, 2.3.1, 3.0.0
    • Component/s: None
    • Labels:
      None

      Description

      Consider the case where we have a master and slave Karaf instance:

      1. Master has acquired lock
      ... time passes...
      2. Network problem happens
      3. Master loses lock (due to the network problem) and reduces start level accordingly
      4. Before start level reduction is complete master manages to grab the lock
      6. Start level is set back to normal

      Seems that flipping the start level around before the container has time to complete is not safe. Proposed solution is to just pause the locking loop until the start level is actually complete before trying to regain the lock. This will prevent flipping of the start level too quickly. Patch coming soon

      1. KARAF-1938.patch
        11 kB
        Jonathan Anstey
      2. KARAF-1938.2.3.x.patch
        11 kB
        Jonathan Anstey
      3. KARAF-1938.trunk.patch
        10 kB
        Jonathan Anstey

        Activity

        Hide
        ffang Freeman Fang added a comment -

        Apply patch on behalf of Jonathan Anstey with thanks
        http://svn.apache.org/viewvc?rev=1400794&view=rev for 2.2.x branch
        http://svn.apache.org/viewvc?rev=1401944&view=rev for 2.3.x branch
        http://svn.apache.org/viewvc?rev=1403940&view=rev for trunk

        Show
        ffang Freeman Fang added a comment - Apply patch on behalf of Jonathan Anstey with thanks http://svn.apache.org/viewvc?rev=1400794&view=rev for 2.2.x branch http://svn.apache.org/viewvc?rev=1401944&view=rev for 2.3.x branch http://svn.apache.org/viewvc?rev=1403940&view=rev for trunk
        Hide
        janstey Jonathan Anstey added a comment -

        Here are the patches to fix trunk and the 2.3.x branch.

        Show
        janstey Jonathan Anstey added a comment - Here are the patches to fix trunk and the 2.3.x branch.
        Hide
        janstey Jonathan Anstey added a comment -

        Thanks Freeman. Yeah, I'll find some time soon to do up trunk & 2.3 patches.

        Cheers,
        Jon

        Show
        janstey Jonathan Anstey added a comment - Thanks Freeman. Yeah, I'll find some time soon to do up trunk & 2.3 patches. Cheers, Jon
        Hide
        ffang Freeman Fang added a comment -

        apply patch on behalf of Jonathan Anstey with thanks.
        http://svn.apache.org/viewvc?rev=1400794&view=rev for 2.2.x branch

        @Jon
        Do you mind also provide patch against 2.3.x branch and trunk?
        Thanks

        Show
        ffang Freeman Fang added a comment - apply patch on behalf of Jonathan Anstey with thanks. http://svn.apache.org/viewvc?rev=1400794&view=rev for 2.2.x branch @Jon Do you mind also provide patch against 2.3.x branch and trunk? Thanks
        Hide
        janstey Jonathan Anstey added a comment -

        Oh, and if it wasn't obvious, this patch needs to be applied in the main dir (http://svn.apache.org/repos/asf/karaf/branches/karaf-2.2.x/main/).

        Show
        janstey Jonathan Anstey added a comment - Oh, and if it wasn't obvious, this patch needs to be applied in the main dir ( http://svn.apache.org/repos/asf/karaf/branches/karaf-2.2.x/main/ ).
        Hide
        janstey Jonathan Anstey added a comment -

        Patch to fix issue for 2.2.x. I can do up an additional patch for trunk, etc if this change is OK.

        Show
        janstey Jonathan Anstey added a comment - Patch to fix issue for 2.2.x. I can do up an additional patch for trunk, etc if this change is OK.

          People

          • Assignee:
            ffang Freeman Fang
            Reporter:
            janstey Jonathan Anstey
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development