Project

General

Profile

Actions

Bug #1753

closed

PIT entry copies the Interest, instead of storing a shared_ptr of the supplied Interest

Added by Alex Afanasyev over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Faces
Target version:
Start date:
07/10/2014
Due date:
% Done:

100%

Estimated time:

Description

I'm still investigating the problem/cause, but what I'm getting is when I send /localhost/nfd/status Interest just after NFD starts, the Interest becomes "gone" between it is send to InternalFace->sendInterest and processed with posted event in InternalFace::processInterest.

Actions #1

Updated by Junxiao Shi over 10 years ago

The design is: PIT entry has a copy of Interest for indexing purpose; PIT downstream record has a shared_ptr of the latest similar Interest from that face.

Actions #2

Updated by Alex Afanasyev over 10 years ago

There is no point of doing extra copies. It is enough to store shared_ptr to any of the Interests. This is a small performance issue.

In any case, the issue is different. Actually, there are two issues:

  1. When two identical Interests are received (in my case I happen to send two /localhost/nfd/status Interests), neither of them is satisfied and you would see "Interest gone" warning from InternalFace. From what I'm guessing is that the second Interest replaces first Interest in the in record and previous shared_ptr is no longer valid.

  2. I don't see that the PIT records is ever deleted in this case. Now I'm trying to find where we set timer for PIT entry lifetime.

Actions #3

Updated by Alex Afanasyev over 10 years ago

What was motivation on using weak_ptr in InternalFace? The core of the problem is in this... In this specific scenario, shared_ptr becomes invalid by the time entry is getting processed (it is being replaced by another shared_ptr for similar interest).

Actions #4

Updated by Alex Afanasyev over 10 years ago

  • Status changed from New to Code review
  • % Done changed from 0 to 100
Actions #5

Updated by Alex Afanasyev over 10 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF