archiver-appliance / epicsarchiverap

This is an implementation of an archiver for EPICS control systems that aims to archive millions of PVs.
Other
39 stars 38 forks source link

Clean up incorrect nanos from the IOC. #35

Closed slacmshankar closed 6 years ago

slacmshankar commented 7 years ago

Some IOC's will send a invalid nanos. EPICS base deals with this by rounding up/truncation. Use a similar algorithm for dealing with invalid nanos from the IOC.

235672894 [PVNameDispatcherPVNameEvents 3] ERROR org.epics.archiverappliance.engine.model.ScannedArchiveChannel - exception in handleNewValue for pv ... java.lang.IllegalArgumentException: nanos > 999999999 or < 0 at java.sql.Timestamp.setNanos(Timestamp.java:389) at org.epics.archiverappliance.common.TimeUtils.convertFromYearSecondTimestamp(TimeUtils.java:64) at edu.stanford.slac.archiverappliance.PB.data.PBScalarInt.getEventTimeStamp(PBScalarInt.java:116)

slacmshankar commented 6 years ago

Fixed with fbe5131