Bug #1753
closedPIT entry copies the Interest, instead of storing a shared_ptr of the supplied Interest
100%
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.
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.
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:
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.
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.
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).
Updated by Alex Afanasyev over 10 years ago
- Status changed from New to Code review
- % Done changed from 0 to 100
Updated by Alex Afanasyev over 10 years ago
- Status changed from Code review to Closed