You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Data below seem to indicate that the problem indeed happens at term boundary, for the discarded fragment, in io.aeron.FragmentAssembler#handleFragment, I get the following values:
termLength = 4194304
builder.nextTermOffset() = 4193728
header.termOffset() = 0 indicates we just started a new term
length = 555 might be a clue:
builder.nextTermOffset() + length < termLength doesn't suggest reaching a new term (and requiring to fill the current one with padding).
could it be that artio assumes the current message fragments will fit in the rest of the term when it's not the case?
The text was updated successfully, but these errors were encountered:
fredfp
changed the title
Message loss: message fragments written across terms boundary are discorded in re-assembly
Message loss: message fragments written across terms boundary are discarded in re-assembly
Nov 4, 2024
…ic#527)
The code to calculate required length was using the wrong HEADER_LENGTH
constant and undercounting it. In unlucky cases it might have looked like
a message would fit in the remaining space at the end of the term, while
actually it wouldn't. So instead of writing padding and then the fragmented
message, the first fragment would get written, then padding, and then the
remaining fragments in the next term. On the subscription side, a fragment
assembler would ignore such messages.
Fixes: 75b9fde ("fix term padding at the end of term buffers")
Description
Artio version 0.154
When working as initiator, some incoming FIX messages are lost/discarded. Symptoms are:
Enqueued
inuk.co.real_logic.artio.protocol.GatewayPublication#saveMessage(org.agrona.DirectBuffer, int, int, int, long, long, int, long, uk.co.real_logic.artio.messages.MessageStatus, int, long, org.agrona.DirectBuffer, int)
Received
inuk.co.real_logic.artio.library.LibraryPoller#onMessage
Enqueued
and thenReceived
, which triggers a resend request.Analysis
io.aeron.FragmentAssembler#handleFragment
header.termOffset() == builder.nextTermOffset()
test fails, see more debug details belowMore debug details
Data below seem to indicate that the problem indeed happens at term boundary, for the discarded fragment, in
io.aeron.FragmentAssembler#handleFragment
, I get the following values:termLength = 4194304
builder.nextTermOffset() = 4193728
header.termOffset() = 0
indicates we just started a new termlength = 555
might be a clue:builder.nextTermOffset() + length < termLength
doesn't suggest reaching a new term (and requiring to fill the current one with padding).The text was updated successfully, but these errors were encountered: