immudb icon indicating copy to clipboard operation
immudb copied to clipboard

GetAll is not failing under keynotfound

Open emkaminsk opened this issue 3 years ago • 6 comments

GetAll may return a sublist of the requested entries in case keys are not found

The sublist may be returned but the error of keynotfound may be returned anyways

Existent applications may expect all requested keys were found if no error is raised. While I think it's the same behaviour from the "older times", it may not be the expected one

emkaminsk avatar Aug 29 '22 11:08 emkaminsk

It's important to fix and test TrustCenter and CAS without waiting for the next release

jeroiraz avatar Aug 29 '22 11:08 jeroiraz

@qrdl @ldej Please take a look

emkaminsk avatar Sep 05 '22 11:09 emkaminsk

@qrdl @ldej Please take a look

We need to check all calls of GetAll() on TrustCenter (and old CNC) if it has any expectation from immudb about keys which are missing in the database. Currently we don't fail but return smaller subset of key-value-metadata pairs but we would like to throw an error in such case.

byo avatar Sep 05 '22 11:09 byo

vcn handles the situation when TC returns less assets than was requested, the missing ones are considered unknown. vcn doesn't communicate with immudb directly, but I guess TC just passes it to vcn

qrdl avatar Sep 05 '22 11:09 qrdl

GetAll is used in the following places in codenotary-cloud:

  1. Data service uses it in VCNGetArtifacts which is used by vcn
  2. When querying a ledger, postgres is used as search cache. The hashes found in that query are requested from immudb with GetAll

That's it.

ldej avatar Sep 05 '22 11:09 ldej

vcn handles the situation when TC returns less assets than was requested, the missing ones are considered unknown. vcn doesn't communicate with immudb directly, but I guess TC just passes it to vcn

OK, this means that the change we want to add to immudb will not be compatible with current TC code.

byo avatar Sep 05 '22 13:09 byo