Replication: The lineage parameter is shorter than the minimum required size

Problem:

I created/altered a (new) record on Subscriber B which I then synchronized with my publisher. The row is then downloaded to Subscriber A and fails. Running a profiler trace, I notice that the error message is the following:

Server: Msg 21512, Level 16, State 5, Procedure ins_xxxxx, Line 32
GETMAXVERSION: The lineage parameter is shorter than the minimum required size.
Server: Msg 3621, Level 16, State 1, Procedure ins_xxxxx, Line 32
The statement has been terminated.
The statement has been terminated.

Cause / Solution:

Note: Audit triggers are handy in this situation for troubleshooting purposes

select * from dbo.MSmerge_tombstone where reason = 'No longer belongs in this partial'

rowguid

tablenick

type

lineage

generation

reason

533F8506-8E8C-4CB9-8EE6-1DCF4342A502 165741556 5 0x00 55 No longer belongs in this partial
A7696D22-8A1E-458C-85D0-139AACD9910A 165741556 5 0x00 55 No longer belongs in this partial

Type 5 means that SQL deleted this row cause it was out of partition. This normally indicates that there is an issue with your filters and they should be checked. The key point it to figure out why SQL has classified this data as "out of partition data”. Once the filters are checked (and corrected), perform a dummy update in order to replication changes.