Bug #3381
closedFace lifetime missing in dataset
100%
Description
Steps to reproduce:
- start NFD with one or more UDP channels
- cause NFD to create a UDP on-demand face, by sending an Interest to NFD from a remote host over UDP tunnel
- execute
nfd-status -f
Expected: the UDP on-demand face has an expires field
Actual: the UDP on-demand face has no expires field
Updated by Junxiao Shi almost 10 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;
Updated by Eric Newberry almost 10 years ago
- Status changed from New to In Progress
- Assignee set to Eric Newberry
Updated by Eric Newberry almost 10 years ago
Is this field only applicable to unicast UDP or is it also used by other Transports?
Updated by Eric Newberry almost 10 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?
Updated by Junxiao Shi almost 10 years ago
Answer to note-3:
Face lifetime is applicable to on-demand datagram faces only.
Answer to note-4:
- Introduce
ndn::nfd::FaceStatus FaceManager::collectFaceStatus(const Face& face, time::steady_clock::TimePoint now)static method, that callsFaceManager::collectFacePropertiesandFace:: getExpirationTime. - Merge
collectFaceCountersintocollectFaceStatussince this is the only usher. - Use
collectFaceStatusin bothlistFacesandqueryFaces.
Updated by Eric Newberry almost 10 years ago
- Status changed from In Progress to Code review
Updated by Eric Newberry almost 10 years ago
- Status changed from Code review to Closed
- % Done changed from 0 to 100