Page MenuHomeSoftware Heritage

indexer.storage: Make add/del endpoints sum up added objects count
ClosedPublic

Authored by ardumont on Mar 3 2020, 4:18 PM.

Details

Reviewers
vlorentz
Group Reviewers
Reviewers
Summary

This will allow to send metrics at some point.

Test Plan

tox

Diff Detail

Repository
rDCIDX Metadata indexer
Branch
make-add-del-endpoints-summarize
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10888
Build 16370: tox-on-jenkinsJenkins
Build 16369: arc lint + arc unit

Event Timeline

vlorentz requested changes to this revision.Mar 3 2020, 4:28 PM
vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/indexer/sql/40-swh-func.sql
450

does this mean the postgres server is sending back all the data? Can't you make it return a count, or at worst just the ids?

(same comment for other occurrences above)

swh/indexer/storage/__init__.py
171

-> Dict[str, int]

(same comment for other occurrences below)

This revision now requires changes to proceed.Mar 3 2020, 4:28 PM
vlorentz added inline comments.
swh/indexer/sql/40-swh-func.sql
452–453

wow now that's some black magic!

This revision is now accepted and ready to land.Mar 3 2020, 8:05 PM
sql/upgrades/131.sql
120

ouch...
we do end up currently doing twice the query...
without returning any result as the second query will do nothing...

thus why i see 'uneventful' task fossology license even though this is currently increasing slowly.