ContentStore: newest unsolicited Data is evicted first
As we know, an application can publish the data packets into content store without consumer requesting. It is the so called Pre-publish. But we found a strange phenomenon that the unsolicited data packet which is latest published will be replaced when the number of data packet in content store reaches 65536.
We found a bug in content store replacement policy by reading source code of NFD and doing experiments. When the content store is full of unsolicited data packet and our application publish data packet into content store continually using pre-publish approach, the content store will make place for the new unsolicited data packet but it always remove the one which is latest published into it. Therefore, the new unsolicited data packet will be removed immediately when the application publishes its data packet continually.
Updated by Junxiao Shi about 7 years ago
- Subject changed from The Bug of NDN Content Store Replacement Policy to ContentStore: newest unsolicited Data is evicted first
- Target version set to v0.3
The original spec requires evicting unsolicited Data first, but didn't specify how to pick among unsolicited Data packets.
I agree that evicting the one coming first is a reasonable algorithm.