Skip to content

feat: temporarily log query duration for debugging

João Pereira requested to merge temp-query-dur-log into master

Related to #916 (closed).

To rule out a problem restricted to just a few of the 64 partitions, we need to identify the target repository for the queries with an unexpectedly large latency. It's not possible to see the arguments of SQL queries in the PostgreSQL logs, neither we log those on the registry side (well, we do log, but that's behind the debug log level, which would open the door to a huge flux of all kinds of unwanted log entries).

For this reason, and for debugging purposes only, this MR introduces a temporary log entry around the execution of these two queries, including the query arguments and the result (found/not found). We need to consider a proper solution to temporarily toggle logs for the latency of all database queries in a generic way (likely as part of gitlab#391751), but for now, we need to make progress on the investigation of the linked issue, thus this quick workaround.

Edited by João Pereira

Merge request reports