question

Upvotes
Accepted
1 0 0 0

OmmPool.acquireCopy() - does it copy everything exactly?

During the client.processEvent() handler, we take a copy of the OMMMsg using OMMPool.acquireCopy() and store it for later processing on a separate thread.

When we come to parse this message, we seem to see a problem with parsing OmmTypes.TIME, specifically we end up with the wrong date.


Code sample:

case OMMTypes.TIME:
   OMMDateTime ommdateTime = (OMMDateTime) value; 
   if (!ommdateTime.isBlank()) {
       if (fidDef.getMaxOMMLengthAsInt() == 8) {
          long millisSinceEpoch = ommdateTime.toSeconds(); 
          int microS = ommdateTime.getMicrosecond(); 
          int nanoS = ommdateTime.getNanosecond();
          long nanosSinceEpoc = millisSinceEpoch*1000000 + (microS<1000 ? microS*1000 : 0) + (nanoS<1000 ? nanoS : 0);  

          .....


An example field would be QUOTIM_NS

When we look at nanosSinceEpoc as a DataTime, it has a plausible time component, but that the date component appears to stick to the date that the process started. It doesn't change at 00:00:00 as might be expected.


When we DO NOT copy the message using OMMPool.acquireCopy() , but instead parse the original message, we see the date behaving as expected.


This is with Java RFA version 8.1.3.E2



treprfarfa-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

(I notice in the docs for acquireCopy(), it says

"This may not be an exact copy of the internal wire format, based on readOnlyCopy and optimizations."
Upvotes
Accepted
23k 22 9 14

Hello @d.hancock ,

I think you are reporting a suspected issue on Java RFA version 8.1.3.E2.

The suspected issue would need to be reproduced, verified and investigated in detail as the next step.

JRFA has underwent mandatory rebranding. To learn more of RFA rebranding, please see Product Change Notification (PCN) detailing the changes and requirements. Any suspected issue report would be eligible for a prioritization to a fix in a re-branded version, and need to be reproduced in the re-branded version.

Would like to suggest to try re-test the scenario in the latest re-branded version 8.2, and if the issue does not manifest, to migrate to the latest, while if it continues to manifest, as your organization is a Premium Support member, to submit the suspected issue as Premium support case, by one of your organization's Premium Support members, for the detailed verification and investigation, further action dependent on the findings.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 0 0

Could it be that the Calendar uses in OMMDateTime.toSeconds() isn't being copied/updated correctly?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea