Project

General

Profile

Actions

Feature #3944

closed

Omitted FreshnessPeriod implies always stale

Added by Junxiao Shi about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tables
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
3.00 h

Description

In Content Store, treat a Data without FreshnessPeriod as FreshnessPeriod=0ms (always stale) rather than FreshnessPeriod=infinity (always fresh).


Related issues 1 (0 open1 closed)

Blocked by NDN Specifications - Feature #2440: Omitted FreshnessPeriod implies always staleClosedEric Newberry

Actions
Actions #1

Updated by Junxiao Shi about 7 years ago

  • Blocked by Feature #2440: Omitted FreshnessPeriod implies always stale added
Actions #2

Updated by Junxiao Shi about 7 years ago

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.

Actions #3

Updated by Junxiao Shi about 7 years ago

  • 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.

Actions #4

Updated by Eric Newberry almost 7 years ago

  • Status changed from New to In Progress
Actions #5

Updated by Eric Newberry almost 7 years ago

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.

Actions #6

Updated by Eric Newberry almost 7 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 100
Actions #7

Updated by Eric Newberry almost 7 years ago

https://gerrit.named-data.net/#/c/3883 to ndn-cxx causes unit test failures in ndn-tools and possibly other projects.

Actions #8

Updated by Eric Newberry almost 7 years ago

The issues in ndn-tools mentioned in note 7 should be fixed in the new patchset posted for ndn-cxx and with the new change pushed for ndn-tools (https://gerrit.named-data.net/#/c/3899/).

Actions #9

Updated by Eric Newberry almost 7 years ago

  • Status changed from Code review to Closed
Actions #10

Updated by Junxiao Shi almost 7 years ago

  • Status changed from Closed to Resolved

There's a mistake in merged code, causing default-constructed Selectors to be non-empty.
I fixed it in https://gerrit.named-data.net/3998.

Actions #11

Updated by Davide Pesavento almost 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF