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
Branch
fix-inmem-stat_counters
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2509
Build 3103: tox-on-jenkinsJenkins
Build 3102: arc lint + arc unit

Event Timeline

anlambert added a subscriber: anlambert.

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

swh/storage/in_memory.py
902

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
902

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