~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/gopkg.in/juju/charmstore.v5-unstable/internal/charmstore/stats.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
548
548
// TODO (frankban): remove this method when removing the legacy counts logic.
549
549
func (s *Store) legacyDownloadCounts(id *charm.URL) (AggregatedCounts, error) {
550
550
        counts := AggregatedCounts{}
551
 
        entities, err := s.FindEntities(id, "extrainfo")
 
551
        entities, err := s.FindEntities(id, FieldSelector("extrainfo"))
552
552
        if err != nil {
553
553
                return counts, errgo.Mask(err, errgo.Is(params.ErrNotFound))
554
554
        }
631
631
                // This unfortunately adds an extra round trip to the database,
632
632
                // but as incrementing statistics is performed asynchronously
633
633
                // it will not be in the critical path.
634
 
                entity, err := s.FindEntity(id, "promulgated-revision")
 
634
                entity, err := s.FindEntity(id, FieldSelector("promulgated-revision"))
635
635
                if err != nil {
636
636
                        return errgo.Notef(err, "cannot find entity %v", &id.URL)
637
637
                }