Hi,
In our test env, we have got the following problem. After analyzing found the
problem occured due system time changes. Actually in our cluster we are running
a periodic syncup scripts just to unify the SystemTime in all the machines.
This is causing the problem and resulting ArrayIndexOutOfBoundException.
I agree it is not good to change the system time on a running process, still
I'm thinking we can use System.nanoTime(), this will be giving the JVM startup
time and will helpful to withstand this kind of minor accidents(as this came in
the stat calculation logic).
Exception in thread "BookieJournal-3181"
java.lang.ArrayIndexOutOfBoundsException: -423
at org.apache.bookkeeper.proto.BKStats$OpStats.updateLatency(BKStats.java:126)
at org.apache.bookkeeper.proto.BookieServer.writeComplete(BookieServer.java:655)
at org.apache.bookkeeper.bookie.Journal.run(Journal.java:507)
// compute the latency
if (0 == rc) {
// for add operations, we compute latency in writeComplete
callbacks.
long elapsedTime = System.currentTimeMillis() - startTime;
bkStats.getOpStats(BKStats.STATS_ADD).updateLatency(elapsedTime);
}
Thanks & Regards,
Rakesh