archiver-appliance / epicsarchiverap

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

Patch HTTP/raw service or pbrawclient library to deal with extraordinary nanoseconds #75

Open RF1024 opened 5 years ago

RF1024 commented 5 years ago

Currently, CS-Studio's DataBrowser consumes Archiver Appliance's HTTP/RAW service to retrieve archived data (i.e. PVs). In its turn, the HTTP/RAW service uses the pbrawclient library to read archived data from protocol buffer files. If archived PVs have nanoseconds >10^9, it will make the DataBrowser raise an illegal exception (see the stack dump below).

One way to solve this could be to apply the same patch done for the HTTP/JSON service on the HTTP/RAW service or pbrawclient library. Please see https://github.com/slacmshankar/epicsarchiverap/issues/35 and https://github.com/slacmshankar/epicsarchiverap/commit/fbe513104aa6745d801c3282d5b02a0b1f25ee7f for additional details.


2019-03-15 08:14:42.690 WARNING [Thread 50] org.csstudio.trends.databrowser3.ui.ControllerBase$BaseArchiveFetchJobListener (archiveFetchFailed) - No archived data for ISrc-010:PBI-BCM-001:AI4-IPCH-RBV

java.lang.IllegalArgumentException: nanos > 999999999 or < 0

   at java.sql.Timestamp.setNanos(Timestamp.java:389)

   at org.epics.archiverappliance.retrieval.client.EpicsMessage.<init>(EpicsMessage.java:34)

   at org.epics.archiverappliance.retrieval.client.InputStreamBackedGenMsg.readLineAndParseNextMessage(InputStreamBackedGenMsg.java:221)

   at org.epics.archiverappliance.retrieval.client.InputStreamBackedGenMsg.access$000(InputStreamBackedGenMsg.java:35)

   at org.epics.archiverappliance.retrieval.client.InputStreamBackedGenMsg$1.next(InputStreamBackedGenMsg.java:75)

   at org.epics.archiverappliance.retrieval.client.InputStreamBackedGenMsg$1.next(InputStreamBackedGenMsg.java:64)

   at org.csstudio.archive.reader.appliance.ApplianceValueIterator.next(ApplianceValueIterator.java:128)

   at org.csstudio.trends.databrowser3.archive.ArchiveFetchJob$WorkerThread.run(ArchiveFetchJob.java:155)

   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

   at java.util.concurrent.FutureTask.run(FutureTask.java:266)

   at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

   at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

   at java.lang.Thread.run(Thread.java:748)