ndn-python-repo installed into venv with this command:
pip install git+https://github.com/UCLA-IRL/ndn-python-repo@dda1dce135a952498a2a79d3cddf9c3ee33399d0
With the repo configured as register_root=False, when a client inserts some Data packets with the same register_prefix value and deletes a subset of them, the prefix is unregistered even if the repo still contains other Data packets with that register_prefix value.
Client inserts /R/0, /R/1, /R/2 with register_prefix=/R.
The repo sends a prefix registration command for /R as expected.
Client inserts /R/3, /R/4, /R/5 with register_prefix=/R.
Client deletes /R/0, /R/1, /R/2 with register_prefix=/R.
The repo sends a prefix unregistration command for /R, despite that it still has /R/3, /R/4, /R/5 Data packets.
The repo should remember how many inserted packets requested the same prefix registration, and only unregister the prefix when the last packet requesting this registration is deleted.
It is unreasonable to require the client to remember every packet ever inserted to the repo and only include register_prefix field in the deletion command of the last packet, because many client applications would be short-lived or distributed.
If the client would have to keep detailed and synchronized state of every packet ever inserted to the repo, the client application may as well serve the packets themselves instead of using a repo.
Environment:
pip install git+https://github.com/UCLA-IRL/ndn-python-repo@dda1dce135a952498a2a79d3cddf9c3ee33399d0
With the repo configured as
register_root=False
, when a client inserts some Data packets with the sameregister_prefix
value and deletes a subset of them, the prefix is unregistered even if the repo still contains other Data packets with thatregister_prefix
value.Packet trace: 2.pcap.zip
In this packet trace:
/R/0
,/R/1
,/R/2
withregister_prefix=/R
. The repo sends a prefix registration command for/R
as expected./R/3
,/R/4
,/R/5
withregister_prefix=/R
./R/0
,/R/1
,/R/2
withregister_prefix=/R
. The repo sends a prefix unregistration command for/R
, despite that it still has/R/3
,/R/4
,/R/5
Data packets.ndn-python-repo console logs:
The repo should remember how many inserted packets requested the same prefix registration, and only unregister the prefix when the last packet requesting this registration is deleted. It is unreasonable to require the client to remember every packet ever inserted to the repo and only include
register_prefix
field in the deletion command of the last packet, because many client applications would be short-lived or distributed. If the client would have to keep detailed and synchronized state of every packet ever inserted to the repo, the client application may as well serve the packets themselves instead of using a repo.