Project

General

Profile

Actions

Bug #3381

closed

Face lifetime missing in dataset

Added by Junxiao Shi almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Management
Target version:
Start date:
12/25/2015
Due date:
% Done:

100%

Estimated time:
3.00 h

Description

Steps to reproduce:

  1. start NFD with one or more UDP channels
  2. cause NFD to create a UDP on-demand face, by sending an Interest to NFD from a remote host over UDP tunnel
  3. execute nfd-status -f

Expected: the UDP on-demand face has an expires field

Actual: the UDP on-demand face has no expires field

Actions #1

Updated by Junxiao Shi almost 9 years ago

In 2014 Face design, FaceManager invokes Face::getFaceStatus method on every face to obtain its FaceStatus struct.

In #3177, Face::getFaceStatus is eliminated, and FaceManager becomes responsible to populate the FaceStatus struct, but "remaining lifetime" field wasn't considered.

Currently, Face class and Transport class lack a getter for FaceManager to obtain or compute "remaining lifetime".

To fix this bug, a getter needs to be defined in "dynamic properties" section.

/** \return expiration time of the face
 *  \retval time::steady_clock::TimePoint::max() the face has indefinite lifetime
 */
time::steady_clock::TimePoint
getExpirationTime() const;
Actions #2

Updated by Eric Newberry almost 9 years ago

  • Status changed from New to In Progress
  • Assignee set to Eric Newberry
Actions #3

Updated by Eric Newberry almost 9 years ago

Is this field only applicable to unicast UDP or is it also used by other Transports?

Actions #4

Updated by Eric Newberry almost 9 years ago

Nevermind the question in note 3.

However, I have another question: FaceManager::collectFaceProperties is used with both FaceStatus and FaceEventNotification, the former having an ExpirationPeriod field, while the latter does not. As such, I see two options to proceed: Either remove the template and create separate functions for each class or add an ExpirationPeriod field to FaceEventNotification. Does anyone have any better ideas?

Actions #5

Updated by Junxiao Shi almost 9 years ago

Answer to note-3:

Face lifetime is applicable to on-demand datagram faces only.

Answer to note-4:

  1. Introduce ndn::nfd::FaceStatus FaceManager::collectFaceStatus(const Face& face, time::steady_clock::TimePoint now) static method, that calls FaceManager::collectFaceProperties and Face:: getExpirationTime.
  2. Merge collectFaceCounters into collectFaceStatus since this is the only usher.
  3. Use collectFaceStatus in both listFaces and queryFaces.
Actions #6

Updated by Eric Newberry almost 9 years ago

  • Status changed from In Progress to Code review
Actions #7

Updated by Eric Newberry almost 9 years ago

  • Status changed from Code review to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF