[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] activemq-artemis pull request #2444: ARTEMIS-2186 Large message incomplete w...

Github user wy96f commented on a diff in the pull request:

    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java ---
    @@ -1018,6 +1018,7 @@ private void sendContinuations(final int packetSize,
              if (!continues) {
    +            currentLargeMessage.sync();
    --- End diff --
    Some other code is calling releaseResources such as LargeServerMessageImpl::deleteFile, LargeMessageDeliverer::finish which would cost an extra system call. We'd better sync when the large message file is first created and finished.
    I just found ServerSessionImpl::messageToLargeMessage needs a sync as well.
    Could we add a sync parameter in releaseResources? If true, file will be synced before closing.