Project

General

Profile

Actions

Task #1887

closed

The problem of ndnputfile and ndngetfile

Added by Weiqi Shi over 10 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Target version:
-
Start date:
08/18/2014
Due date:
% Done:

100%

Estimated time:

Description

There are some problems both in the design and implementation of these tools.

  1. repo cannot use ndngetfile to get the data which is inserted by ndnputfile with -s.

When we use ndnputfile -s, the tool will automatically and randomly append a version number after the prefix.

When we want to use ndngetfile, we can decide to use only the prefix or use the prefix with version number to request data (for parameter, with -u means the name contain the version number, without -u means the name we use is only a prefix). Both these two mode cannot be used to get the data back.

1) if without -u, the tool assumes that the data received should include version number as the second to last component and sequence number as last component. But as mentioned above, if we use ndnputfile -s to insert the data, no sequence number will be appended. In this case, repo will throw an error due to the name size does not match, even if the correct data has been pushed back.

2) if with -u, the ndngetfile tool will append a sequence number for interest name (prefix + version + sequence), which cannot be recognized by the repo who have the data. In current repo storage, data names are in the format: prefix + (version) + (sequence) + digest. Since the data inserted by ndnputfile -s, there is no sequence in data name, therefore repo cannot use Name::isPrefixOf to match the correct data.

  1. We cannot use ndnputfile without -s to insert small data, which could be stored in only one data packet.

In most cases, we should specify -s when we want to insert small data and the data will be stored in one data packet. But in some cases, if we forget to specify -s, repo should also work well by using segment insertion, even if only one segment carries data. However, current ndnputfile cannot make it. Since by using segment insertion, the finalblockId will be specified as %00. WriteHandle needs to use Component::toSegment to decode it from a name component. But this function will throw an error: "Invalid length for nonNegativeInteger (only 1, 2, 4, and 8 are allowed)" and stop the process. Therefore either the toSegment function or the finalBlockId needs to be improved.


Related issues 3 (0 open3 closed)

Has duplicate repo-ng - Bug #1896: Multiple errors with ndnputfileClosed08/20/2014

Actions
Has duplicate repo-ng - Task #1867: Initiation read entries from databaseClosedWeiqi Shi08/15/2014

Actions
Has duplicate repo-ng - Task #1810: ERROR: command response timeout from "ndnputfile"Closed07/29/2014

Actions
Actions

Also available in: Atom PDF