Skip to content

search: aggregate stats independently of priority result queue

Administrator requested to merge k/aggregate-stats into main

Created by: keegancsmith

We introduced logic to avoid putting stats only events onto the result queue. The result queue is used to reoder results such that they are organised by priority (number of stars in the corresponding repo). We have lots of stats only events and the results queue has a max depth. This meant we would often flush the queue leading to results which where not correctly ordered.

However, that fix made us not update the queue with the last MaxPendingPriority we received from an endpoint. This also meant we would delay sending results until all zoekts had returned in the case of some endpoints not having matches. This lead to the recently removed warning log line "results not sent in core loop".

The purpose of this commit is to fix the logic such that we send results sooner. This means we can add back the "results not sent in core loop" log line which was a legitimate warning.

Merge request reports

Loading