Feature #3944
closed
Omitted FreshnessPeriod implies always stale
Added by Junxiao Shi almost 8 years ago.
Updated over 7 years ago.
Description
In Content Store, treat a Data without FreshnessPeriod as FreshnessPeriod=0ms (always stale) rather than FreshnessPeriod=infinity (always fresh).
- Blocked by Feature #2440: Omitted FreshnessPeriod implies always stale added
The current implementation (omitted FreshnessPeriod means infinity) appears to have an effective FreshnessPeriod of 99999ms.
In nfd::cs::Entry::updateStaleTime()
function, I added:
std::cout << this->getName() << ' ' << time::steady_clock::now() << ' ' << m_staleTime << '\n';
And I got:
/A/5 0 nanoseconds since unit test clock advancements 99999000000 nanoseconds since unit test clock advancements
/A/5 203850304910641 nanoseconds since boot 203950303908994 nanoseconds since boot
However, setting FreshnessPeriod to an explicit value greater than 99999ms works correctly.
- Assignee set to Eric Newberry
- Target version set to v0.6
- Estimated time changed from 1.50 h to 3.00 h
All invocations of getFreshnessPeriod
should be inspected. Some components in addition to CS have conditionals related to omitted FreshnessPeriod.
- Status changed from New to In Progress
Junxiao Shi wrote:
The current implementation (omitted FreshnessPeriod means infinity) appears to have an effective FreshnessPeriod of 99999ms.
In nfd::cs::Entry::updateStaleTime()
function, I added:
std::cout << this->getName() << ' ' << time::steady_clock::now() << ' ' << m_staleTime << '\n';
And I got:
/A/5 0 nanoseconds since unit test clock advancements 99999000000 nanoseconds since unit test clock advancements
/A/5 203850304910641 nanoseconds since boot 203950303908994 nanoseconds since boot
However, setting FreshnessPeriod to an explicit value greater than 99999ms works correctly.
It looks like the CS unit test fixture was setting the FreshnessPeriod of stored data to 99999ms by default. I removed this.
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
- Status changed from Code review to Closed
- Status changed from Closed to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF