p2panda / aquadoggo

Node for the p2panda network handling validation, storage, aggregation and replication
GNU Affero General Public License v3.0
69 stars 5 forks source link

Misleading logging: Blob document exists in database but not on file system #575

Open sandreae opened 11 months ago

sandreae commented 11 months ago

How to reproduce: publish an sighting with an image using https://github.com/p2panda/meli/tree/publish-blob

I/aquadoggo::materializ..(31695): Creating blob at path /data/user/0/com.p2panda.meli/files/0020e9e26e248795e9812c6cbc845ebfc684e51b461d5ca6db307478ee20e9ba805d
I/aquadoggo::materializ..(31695): Creating blob at path /data/user/0/com.p2panda.meli/files/00205f8edadea98824587129216785f9fa9b43548d63f8169cf2037836f4f650648d
I/aquadoggo::materializ..(31695): Creating blob at path /data/user/0/com.p2panda.meli/files/0020b1fce8916c1a9b5b9c197b39e32705fc4950d5c8c45727c7f82fd782865e5dfa
I/aquadoggo::materializ..(31695): Creating blob at path /data/user/0/com.p2panda.meli/files/00205f8edadea98824587129216785f9fa9b43548d63f8169cf2037836f4f650648d
I/aquadoggo::materializ..(31695): Creating blob at path /data/user/0/com.p2panda.meli/files/0020b1fce8916c1a9b5b9c197b39e32705fc4950d5c8c45727c7f82fd782865e5dfa
I/aquadoggo::materializ..(31695): Creating blob at path /data/user/0/com.p2panda.meli/files/0020e9e26e248795e9812c6cbc845ebfc684e51b461d5ca6db307478ee20e9ba805d
I/aquadoggo::materializ..(31695): Creating blob at path /data/user/0/com.p2panda.meli/files/00205f8edadea98824587129216785f9fa9b43548d63f8169cf2037836f4f650648d
W/aquadoggo::http::api(31695): Data inconsistency detected: Blob document 4a21e1 exists in database but not on file
W/aquadoggo::http::api(31695):                 system at path /data/user/0/com.p2panda.meli/files/00208084e70d7b975650be74a07c8e9173eec6194b75a7626fc4269ec266614a21e1!
I/aquadoggo::materializ..(31695): Creating blob at path /data/user/0/com.p2panda.meli/files/0020b1fce8916c1a9b5b9c197b39e32705fc4950d5c8c45727c7f82fd782865e5dfa
...
W/aquadoggo::http::api(31695): Data inconsistency detected: Blob document 4a21e1 exists in database but not on file
W/aquadoggo::http::api(31695):                 system at path /data/user/0/com.p2panda.meli/files/00208084e70d7b975650be74a07c8e9173eec6194b75a7626fc4269ec266614a21e1!
I/aquadoggo::materializ..(31695): Creating blob at path /data/user/0/com.p2panda.meli/files/00208084e70d7b975650be74a07c8e9173eec6194b75a7626fc4269ec266614a21e1
I/aquadoggo::materializ..(31695): Creating blob at path /data/user/0/com.p2panda.meli/files/0020e9e26e248795e9812c6cbc845ebfc684e51b461d5ca6db307478ee20e9ba805d
sandreae commented 11 months ago

It seems that requesting the blob after it has been inserted into the blob store but before it's been materialised onto the file system causes this error.

adzialocha commented 11 months ago

Ah ja, that was indented as an integrity error (I've wiped my blobs folder or misconfigured my node) but I can see now that there's a valid case for requesting the file too early .. we could still leave it? Or does it look too scary?

sandreae commented 11 months ago

Yeh, it's good info to have if you're debugging, but a bit scary if everything is actually fine. Maybe just pushing it down to debug is good.

adzialocha commented 11 months ago

Yeh, it's good info to have if you're debugging, but a bit scary if everything is actually fine. Maybe just pushing it down to debug is good.

Cool, we're warning already for the misconfiguration case.