[Date Prev][Date Next]
stats (and back-monitor) counters wrap when overflowing (ITS#3323)
Full_Name: Pierangelo Masarati
Version: 2.2.15, HEAD
Submission from: (NULL) (188.8.131.52)
I noted that counters in back-monitor, which reflect values incremented by
frontend when performing operations, do wrap when the max value is reached, and
get negative values. E.g., from my torture test (~20 hours of 50 concurrent
reads and writes over a 10000 entries DB, ~2500000 ops):
# ldapsearch -LLL -b 'cn=monitor' '(monitorCounter=*)'
One mandatory fix is to use unsigned counters, to avoid at least the negative
A short term solution (which only defers the problem) would be to use long long
where available, or to separate values into major and minor, and compose the
value in string form.
An ultimate solution would be to use an arbitrary precision math library.