ed54c665b8
This fixes two bugs. First, the "blockPut response CID does not match the multihash" warning was coming up when it shouldn't. Particularly, the multipart reader called Node() several times for the same block, resulting in CIDs been removed from the Seen set, and causing the warning when there were several blocks (usually the empty dir block). This also means we were counting Blockputs (and total data added) wrong in the metrics, double-counting some blocks as these were recorded in Node() calls. The fix makes the tracking in Next(), which is only called once for each block. To avoid timing issues between Block reads from the channel and blockput responses, the Seen set now stores how many times we have seen a block. Thus a duplicated block that will get two BlockPut responses will not trigger a warning regardless of the time when those responses arrive. Fixes #1706. |
||
---|---|---|
.. | ||
ipfshttp |