[Date Prev][Date Next]
Re: (ITS#3323) stats (and back-monitor) counters wrap when
> 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
> reads and writes over a 10000 entries DB, ~2500000 ops):
> # ldapsearch -LLL -b 'cn=monitor' '(monitorCounter=*)'
> dn: cn=Bytes,cn=Statistics,cn=Monitor
> monitorCounter: -2083887046
> dn: cn=PDU,cn=Statistics,cn=Monitor
> monitorCounter: 170793975
> One mandatory fix is to use unsigned counters, to avoid at least the
> A short term solution (which only defers the problem) would be to use long
> where available, or to separate values into major and minor, and compose
> value in string form.
> An ultimate solution would be to use an arbitrary precision math library.
OK, the problem is rather that the LDAP integer syntax has been used
for the counters, so illegal values (i.e. beyond maxInt) are being
stored in the attribute. The quick fix is to avoid setting the counters
to values larger than maxInt. However, the problem of setting very large
counter still exists.
Maybe we better move this discussion to -devel.
SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497