Use partition pruning for find by token queries

What does this MR do and why?

We encode the partition_id in the job token so we can use that value to query only one partition instead of all of them. It also falls back on querying all of them if the value can't be decoded.

References

Related to #578388

Screenshots or screen recordings

The query uses local tokens, so it returns 0 rows.

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Marius Bobin

Merge request reports

Loading