Page MenuHomeSoftware Heritage

Implement content_update for the in-mem storage.
ClosedPublic

Authored by vlorentz on Jan 24 2020, 4:47 PM.

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont added inline comments.
swh/storage/tests/test_api_client.py
64

I don't understand what we are doing with the journal initialization.
if it's not supported, why do we declare it in the dict configuration?
Can't we just remove the configuration key if it's unused?


That reminds me that i discussed with @douardda the possibility to have the journal part moved to a dedicated storage proxy (server side). That would avoid seeing everywhere within our add methods the journal instructions... [1]

I'd be less invasive in the _add endpoints.
What do you think?

[1] @douardda proposed another approach, keep the original storage (storage.py, cassandra.py) the interface with a default implementation (i call that an abstract class...). And push the abstration over the storage backend (db.py, cql.py). I'm not sure which is better.

swh/storage/tests/test_api_client.py
64

if it's not supported, why do we declare it in the dict configuration?

because it's supported in all tests except this one.

I'd be less invasive in the _add endpoints.
What do you think?

I agree, but it will be more work than you assume, and it's out of the scope of my current work on merging the cassandra backend.

ardumont added inline comments.
swh/storage/tests/test_api_client.py
64

I agree, but it will be more work than you assume, and it's out of the scope of my current work on merging the cassandra backend.

yes, completely out of scope, just a heads up since i started talking journal ;)
i got carried away

the good side is that you are in the loop as well ;)

This revision is now accepted and ready to land.Jan 27 2020, 3:56 PM
This revision was landed with ongoing or failed builds.Jan 27 2020, 5:27 PM
This revision was automatically updated to reflect the committed changes.