Bug #2043
closedContentStore: newest unsolicited Data is evicted first
100%
Description
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.