You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/27 05:01:00 UTC

[jira] [Commented] (ARTEMIS-2186) Large message incomplete when server is crashed

    [ https://issues.apache.org/jira/browse/ARTEMIS-2186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16699923#comment-16699923 ] 

ASF GitHub Bot commented on ARTEMIS-2186:
-----------------------------------------

GitHub user wy96f opened a pull request:

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

    ARTEMIS-2186 Large message incomplete when server is crashed

    When sending large message, the large message file on server side is not synced whereas the journal record or paged message is synced.
    
    When server crashes, large message file maybe incomplete.
    
    In our case, we saw an empty file when server crashed and started. Then a large message with zero size body was delivered to client, client occured exception: 
    
    AMQ212058: Unable to get a message.: java.lang.IndexOutOfBoundsException: readerIndex(4) + length(1) exceeds writerIndex(4): UnpooledDuplicatedByteBuf(ridx: 4, widx: 4, cap: 4, unwrapped: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 4, widx: 4, cap: 4))@ClientLargeMessageImpl

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

    $ git pull https://github.com/wy96f/activemq-artemis sync_large_message

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

    https://github.com/apache/activemq-artemis/pull/2443.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 #2443
    
----
commit 7216d1004b3cfc65fc812e5c03197a5bb6a07f24
Author: wy96f <wy...@...>
Date:   2018-02-23T09:32:14Z

    Merge pull request #2 from apache/master
    
    update from origin

commit e54b1286fa0e17e35c2051b4427752d858115134
Author: yang wei <wy...@...>
Date:   2018-05-25T11:54:05Z

    Merge remote-tracking branch 'upstream/master'

commit eacbbf48394d11c159bfb7955651c7b50b93f639
Author: yang wei <wy...@...>
Date:   2018-10-03T07:08:05Z

    Merge branch 'master' of https://github.com/wy96f/activemq-artemis

commit 771cd388a5cafc3b524f922f19ecb5309f7f2725
Author: yang wei <wy...@...>
Date:   2018-11-05T03:07:23Z

    Merge remote-tracking branch 'upstream/master'

commit 335251fb7b984ae0893d12eb589b74eee4a40e90
Author: yang wei <wy...@...>
Date:   2018-11-26T10:31:03Z

    Merge remote-tracking branch 'upstream/master'

commit e6bf8b1b95a3fcec417228144a7a9fc4c719e8d6
Author: yang wei <wy...@...>
Date:   2018-11-27T04:57:38Z

    ARTEMIS-2186 sync large message to avoid the risk of file corruption when server crashes

----


> Large message incomplete when server is crashed
> -----------------------------------------------
>
>                 Key: ARTEMIS-2186
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2186
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>            Reporter: yangwei
>            Priority: Major
>
> When sending large message, the large message file on server side is not synced whereas the journal record or paged message is synced.
> When server crashes, large message file maybe incomplete.
> In our case, we saw an empty file when server crashed and started. Then a large message with zero size body was delivered to client, client occured exception: 
> AMQ212058: Unable to get a message.: java.lang.IndexOutOfBoundsException: readerIndex(4) + length(1) exceeds writerIndex(4): UnpooledDuplicatedByteBuf(ridx: 4, widx: 4, cap: 4, unwrapped: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 4, widx: 4, cap: 4))@ClientLargeMessageImpl



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)