Page MenuHomeSoftware Heritage

Make the in-memory storage use URLs instead of ids as its 'primary key' internally.
ClosedPublic

Authored by vlorentz on Jul 2 2019, 4:54 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

douardda added inline comments.
swh/storage/in_memory.py
1021

dumb question but aren't self._origins and self._origins_by_id supposed to be the same length?

swh/storage/in_memory.py
1021

Yes, they are. It's just that origin_from is used as an index in self._origins_by_id so it makes more sense this way, but both are equivalent.

This revision is now accepted and ready to land.Jul 3 2019, 3:57 PM
This revision was automatically updated to reflect the committed changes.