DDSI-RTPS 2.5 RTF Avatar
  1. OMG Issue

DDSIRTP25 — Discriminating the reasons for a GAP

  • Key: DDSIRTP25-2
  • Status: closed  
  • Source: Real-Time Innovations ( Dr. Gerardo Pardo-Castellote, Ph.D.)
  • Summary:

    The GAP message indicates a gap in sequence numbers that is "not available" to the DataReader. It may be caused by filters (time, content), history keep last, or lifespan.

    In some cases the reason behind the gap is important to the receiving application. For example a missing sequence number caused by a writer-side content filter does not invalidate a coherent change. However if the gap is caused by keep-last history the coherent change must be discarded by the subscriber/reader.

    Currently there is no way for the receiving application to tell the difference.

    There may be also other situations where it may be desirable to account for the different reasons that cause a gap. For example if the reader maintains a "sample lost count" it needs some way to distinguish sample loss from things it it chose to not receive.

    The RTF should address this issue and provide the means to discriminate these cases. A possible approach would be include the information in the flags of the GAP message.

  • Reported: DDSI-RTPS 2.3b1 — Thu, 28 Feb 2019 02:41 GMT
  • Disposition: Resolved — DDSI-RTPS 2.5
  • Disposition Summary:

    Extend GAP submesage to provide information about the reasons for the samples gapped

    Extend the GAP message with optional counters to indicate the numbers of samples that are gapped that fall into one of 3 categories:

    • Non-relevant Samples
    • Relevant Samples
    • Unclassified Samples

    Non-relevant samples are those that are intentionally not sent to the DataReader because they do not match some reader-specified criteria. These include samples filtered dues to a content-filtered topic, samples filtered due to a time-based filter, samples directed to other data readers, etc.
    Non-relevant samples are not considered “lost” and do not invalidate coherent changes.

    Relevant samples are those that should have been received by the DataReader but are not received due to various reasons. They include samples that are lost by the transport when using BEST_EFFORT datawriters, samples replaced in the DataWriter cache due to a HISTORY kind KEEP_LAST, samples removed from the DataWriter cache due to LIFESPAN, etc.
    Relevant samples are considered “lost”. They are counted as such and invalidate coherent changes.

    Unclassified samples are those that are not accounted for by the above two categories. This may be because the DataWriter cannot determine or does not keep track of the reason some sequence numbers are missing for a DataReader.
    Unclassified samples are treated the same way we treat the samples missing dues to GAPs or HEARTBEATs in previous versions of the specification. That way the behavior is backwards compatible.

    The updated GAP message would should like this:

    0...2...........7...............15.............23...............31
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |   GAP      	|X|X|X|X|N|R|G|E| 	octetsToNextHeader      |
    +---------------+---------------+---------------+---------------+
    |        EntityId          	readerId                        |
    +---------------+---------------+---------------+---------------+
    |        EntityId          	writerId                        |
    +---------------+---------------+---------------+---------------+
    |                                                               |
    +        SequenceNumber    	gapStart                        +
    |                                                               |
    +---------------+---------------+---------------+---------------+
    |                                                               |
    ~        SequenceNumberSet	gapList                         ~
    |                                                               |
    +---------------+---------------+---------------+---------------+
    |                                                               |
    +        SequenceNumber    	gapStartGSN  [ only if G==1 ]   +
    |                                                               |
    +---------------+---------------+---------------+---------------+
    |                                                               |
    ~        SequenceNumber    	gapEndGSN    [ only if G==1 ]   ~
    |                                                               |
    +---------------+---------------+---------------+---------------+
    |                                                               |
    +        ChangeCount             relevantCount      [if R==1]   +
    |                                                               |
    +---------------+---------------+---------------+---------------+
    |                                                               |
    +        ChangeCount             nonRelevantCount   [if N==1]   +
    |                                                               |
    +---------------+---------------+---------------+---------------+
    

    Where the 'R' and 'N' are new flags and the added SequenceNumberCount sub-message elements are 64 bit counter encoded the same way as a sequence number:

    +---------------+---------------+---------------+---------------+
    |                      int32      low                           |
    +   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   +
    |                      int32      high                          |
    +---------------+---------------+---------------+---------------+
    

    If R==0, relevantCount shall be set to zero.
    If N==0, nonRelevantCont shall be set to zero.

    The number or unclassified samples shall be set by the formula:

    
    unclassifiedCount  = (gapList.bitmapBase - gapStart) + gapList.numBits
                      -(relevantCount + nonRelevantCount)
    

    In other words, any samples that appear as part of the GAP but are not covered by the relevant count and the irrelevant count.

  • Updated: Tue, 29 Jun 2021 12:54 GMT
  • Attachments: