Feature #4200
Updated by Junxiao Shi over 7 years ago
NFD **straggler timer** keeps PIT entry alive for 100ms after being satisfied by Data or being "rejected" (either strategy decides not to forward, or strategy returns a Nack-NoRoute). The purpose were duplicate detection and measurements. The straggler timer is **not needed for detecting loops**, because if the Interest has been satisfied and then a copy of that Interest comes back to a node, the node would respond with cached Data, thus breaking the loop. The straggler timer is **ineffective for detecting multi-path arrival**, because PIT in-records have been deleted when straggler timer starts. Historically, before #1953 introduced DNL, the PIT entry contained a "Nonce list" which can effectively detect duplicates, but now it's gone. While the straggler timer is **useful for measurement purposes, not every strategy needs it**. The presence and ubiquitous application of straggler also changes the semantics of PIT: the PIT contains both pending Interests and "recently satisfied Interests", and is named "Interest table" in NFD devguide, causing confusion because its semantics differs from "PIT" in literatures. In this issue, **straggler timer is to be replaced with per-strategy decision of PIT entry lifetime extension**. * `nfd::Pit` is back as "pending Interest table", which normally only contains pending Interests. * If an incoming Interest is satisfied by cached Data in CS, no PIT entry shall be created. For example, incoming Interest pipeline can perform CS lookup before PIT insertion. * If a strategy needs to collect additional Data replies for measurement purposes after a pending Interest has been satisfied, it may request to extend PIT entry lifetime for a certain duration in `beforeSatisfyInterest` trigger. If Data/Nack reply arrives within the PIT entry lifetime, the strategy would be triggered, and the PIT lifetime extension is no longer valid. trigger. Within the that trigger callback, the strategy must request to extend PIT entry lifetime again if needed, again, otherwise the PIT entry would be removed as soon as the trigger finishes execution. * If a strategy decides to delay an incoming Interest forwarding, its `afterReceiveInterest` trigger must request to extend PIT entry lifetime. * `Strategy::rejectPendingInterest` action is satisfied by cached Data in CS, no longer needed. If a strategy trigger neither extends PIT lifetime nor forwards the Interest, the entry shall be created. For example, incoming Interest pipeline can perform CS lookup before PIT entry is removed as soon as the trigger finishes execution. insertion.