grafana/pkg/services/annotations
Alexander Zobnin 5e713673e1
Annotations: Optimize search by tags (#93547)
* Annotations: Optimize search on large number of dashboards

* refactor

* fix batch size

* Return early if no annotations found

* revert go.mod

* return nil in case of error

* Move default limit to the API package

* fix empty access control filter

* Set default limit to 100

* optimize query when number of annotations is less than limit

* Update pkg/services/annotations/annotationsimpl/annotations.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* remove limit from store since it's set in API

* set default limit in Find method (do not break tests)

* Only add limit to the query if it's set

* use limit trick for all searches without dashboard filter

* set default page if not provided

---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2024-09-23 17:29:29 +02:00
..
accesscontrol Annotations: Optimize search by tags (#93547) 2024-09-23 17:29:29 +02:00
annotationsimpl Annotations: Optimize search by tags (#93547) 2024-09-23 17:29:29 +02:00
annotationstest Rename Id to ID for annotation models (#62886) 2023-02-03 17:23:09 +01:00
testutil DashboardStore: Use ReplDB and get dashboard quotas from the ReadReplica (#90235) 2024-07-12 10:47:49 -04:00
annotations_repository_mock.go Alerting: Persist annotations from multidimensional rules in batches (#56575) 2022-11-04 10:39:26 -05:00
annotations.go Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
models.go Annotations: Optimize search by tags (#93547) 2024-09-23 17:29:29 +02:00