Bug #3351
closedInconsistent behavior of PibImpl implementation
Description
We defined PibImpl interface and had two PibImpl implementations: PibSqlite3 and PibMemory.
However the behavior of these two are not consistent with each other regarding adding key and certificate.
For example, PibMemory will overwrite existing record when it shares the same name as the added one, while PibSqlite3 will do nothing.
In the current document of these methods, I put "if the key/cert exists, do nothing". However, I do not consider this as good behavior now. We either throw Pib::Error, or update the record and leave existence checking to the caller. I prefer to do update directly to avoid throwing exceptions, and state clearly in document about this behavior.
The fix to this problem involves fixing the document and the implementation.
Updated by Yingdi Yu over 8 years ago
- Status changed from Code review to Closed
- % Done changed from 0 to 100
addressed in a reviewed commit http://gerrit.named-data.net/#/c/2604/