Page MenuHomeSoftware Heritage

Increase test coverage for stat_counters + fix its bugs.
ClosedPublic

Authored by vlorentz on Nov 20 2018, 3:21 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

anlambert added a subscriber: anlambert.

Apart the removal of no more used stat counters keys, LGTM.

swh/storage/in_memory.py
928

Based on what I see in the 'object_counts' table in the production database, the keys directory_entry_dir, directory_entry_file, directory_entry_rev and revision_history are no more supported, so you can safely remove them.
I should also reflect that in the web api /stat/counters endpoint documentation.

I also noticed that the person and origin_visit values are still equal to 0 after loading a git repository
using the in-memory storage as a backend. In order to reflect the storage in production, those should be
handled too but that out of scope for that diff.

This revision is now accepted and ready to land.Nov 21 2018, 5:03 PM
  • Remove directory_entry_dir.
This revision was automatically updated to reflect the committed changes.
vlorentz added inline comments.
swh/storage/in_memory.py
928

I also noticed that the person and origin_visit values are still equal to 0 after loading a git repository
using the in-memory storage as a backend. In order to reflect the storage in production, those should be
handled too but that out of scope for that diff.

-> T1377