[GitHub] activemq-artemis pull request #1742: ARTEMIS-1570 Flush appendExecutor befor...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis pull request #1742: ARTEMIS-1570 Flush appendExecutor befor...

franz1981
GitHub user shoukunhuai opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1742

    ARTEMIS-1570 Flush appendExecutor before take journal snapshot

    When live start replication, it must make sure there is
    no pending write in message & bindings journal, or we may
    lost journal records during initial replication.
   
    So we need flush append executor after acquire StorageManager's
    write lock, before Journal's write lock.
    Also we set a 10 seconds timeout when flush, the same as
    Journal::flushExecutor. If we failed to flush in 10 seconds,
    we abort replication, backup will try again later.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/shoukunhuai/activemq-artemis flush-journal-executor

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/1742.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1742
   
----
commit 3d4c45925f2fe274579b262cedd63103ef29cb4e
Author: shoukun <shoukunhuai@...>
Date:   2017-12-27T02:23:33Z

    Flush appendExecutor before take journal snapshot
   
    When live start replication, it must make sure there is
    no pending write in message & bindings journal, or we may
    lost journal records during initial replication.
   
    So we need flush append executor after acquire StorageManager's
    write lock, before Journal's write lock.
    Also we set a 10 seconds timeout when flush, the same as
    Journal::flushExecutor. If we failed to flush in 10 seconds,
    we abort replication, backup will try again later.

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1742: ARTEMIS-1570 Flush appendExecutor before take ...

franz1981
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1742
 
    How did u find this ? Nice job.
   
    I will see if I can change the logic to not need the wait.
   
   
    Any tests you can share.  
   
   
    I’m out this week for the Xmas break. Will take a look on next week. Ok ?


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1742: ARTEMIS-1570 Flush appendExecutor before take ...

franz1981
In reply to this post by franz1981
Github user shoukunhuai commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1742
 
    @clebertsuconic That will be great if we can avoid wait.
    Please do not merge, i will push my test.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1742: ARTEMIS-1570 Flush appendExecutor before take ...

franz1981
In reply to this post by franz1981
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1742
 
    @shoukunhuai I thought about developing a byteman test with some rules on stopping during the execution, and then releasing it.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1742: ARTEMIS-1570 Flush appendExecutor before take ...

franz1981
In reply to this post by franz1981
Github user shoukunhuai commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1742
 
    @clebertsuconic just pushed my test for your reference.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1742: ARTEMIS-1570 Flush appendExecutor before take ...

franz1981
In reply to this post by franz1981
Github user michaelandrepearce commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1742
 
    @shoukunhuai looks like some check-style bits need tidying up. looking at the PR build failure.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1742: ARTEMIS-1570 Flush appendExecutor before take ...

franz1981
In reply to this post by franz1981
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1742
 
    @clebertsuconic, what's the status of this?


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1742: ARTEMIS-1570 Flush appendExecutor before take ...

franz1981
In reply to this post by franz1981
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1742
 
    I didn't have the time for it yet.. still working on compatibility issues.


---