OOM errors on list legalTags API
We are observing OOM memory errors on Legal service. On closer inspection, we found it's due to list legalTag API
GET /legalTags
When a user makes request to this API, it responds with all legal tags in a data-partition. Service does not impose any restriction on how many legal tags can be fetched using this API. High usage on this endpoint across multiple partitions in an environment leads to out of memory errors and crash the Legal service pods.
We have observed the issue on Azure deployments, though other providers have similar implementation so users may face similar issue on usage spikes.
Suggestion is to add pagination.