extra_info_descriptor table default or wrong values
Working on tpo/network-health/team#313, i thought to include whether a relay is overloaded in the grafana panels, so i tried this query:
select overload_ratelimits_version, overload_ratelimits_timestamp, overload_ratelimits_ratelimit, overload_ratelimits_burstlimit , overload_ratelimits_read_count, overload_ratelimits_write_count, overload_fd_exhausted_version, overload_fd_exhausted_timestamp
from extra_info_descriptor
where fingerprint='0E13738FADDE15FC896E7CDB998C694F89F4E4B2';
which returns many rows as:
overload_ratelimits_version | overload_ratelimits_timestamp | overload_ratelimits_ratelimit | overload_ratelimits_burstlimit | overload_ratelimits_read_count | overload_ratelimits_write_count | overload_fd_exhausted_version | overload_fd_exhausted_timestamp
-----------------------------+-------------------------------+-------------------------------+--------------------------------+--------------------------------+---------------------------------+-------------------------------+---------------------------------
0 | 1969-12-31 23:59:59.999 | -1 | -1 | -1 | -1 | 0 | 1969-12-31 23:59:59.999
Maybe we could allow all these values to be NULL if the relay isn't overloaded?
I then tried to filter overload_ratelimits_read_count and overload_ratelimits_write_count without -1
values and had to treat them as strings for that:
select count (*)
from extra_info_descriptor
where overload_ratelimits_write_count!='-1' and overload_ratelimits_read_count!='-1';
count
--------
169536
So maybe there's a bug here?
Maybe this was introduced by #47 (closed) (which i reviewed, ahem ;))
On a different issue, i think it'd be very helpful to add a VictoriaMetric metric to know whether a relay is overloaded.