State and atomicState DB storage and return values

@rappleg and @Jim thank you both. Looks like the problem has been resolved. Could you throw some light on the issue as well as the expected behavior from my above post. Really appreciate the speedy response. You guys rock!

@rappleg looks like this error has resurfaced again but it appears to be impacting UK servers. Folks who have reported this issue @kraegd @Dave_George

EDIT: NA servers also @anwesh

I am on US region server and ‘shard’ is NA01

@rappleg any update on this? Is this a resurface or some servers were left out of the patch previously?

EDIT: Any chance it can be patched before the weekend?

It looks like originally UK servers didn’t have the fix, but as of about 3pm CST today all servers should now have it. I just spot checked a few apps as a sanity check and I’m still seeing Long come back correctly. I’m unable to reproduce the issue. If anyone is still seeing this please share your code so we can investigate further.

1 Like

Can you share some code from your app that you’re able to reproduce the issue with?

In the first post Ryan along with the error message.

The code:

atomicState."lastMotionCheck${camera.id}" = now()
log.trace "Initializing last motion event checked at ${new Date(atomicState."lastMotionCheck${camera.id}").format("EEE MMM dd yyyy HH:mm:ss z", timeZone)}"

@kraegd @Dave_George @anwesh can you confirm if the issue has been fixed or if you’re still getting the errors ?

Yeah, I’ve tried several variations of that and I’m not seeing it on any servers so far. Here’s an example:

atomicState."lastMotionCheck${camera.id}" = now()
log.warn "LONGVALUE: " + atomicState."lastMotionCheck${camera.id}".longValue()
if (atomicState."lastMotionCheck${camera.id}" instanceof Long)
   log.debug "It's LONG"
if (atomicState."lastMotionCheck${camera.id}" instanceof BigInteger)
   log.warn "It's BigInteger"
log.trace "Initializing last motion event checked at ${new Date(atomicState."lastMotionCheck${camera.id}")}"

The output:

f2b3c215-111b-4121-89c2-4deba4247b4b 7:27:39 PM: trace Initializing last motion event checked at Sat Aug 27 00:27:39 UTC 2016
f2b3c215-111b-4121-89c2-4deba4247b4b 7:27:39 PM: debug It's LONG
f2b3c215-111b-4121-89c2-4deba4247b4b 7:27:39 PM: warn LONGVALUE: 1472257355373

As another data point here, I searched through our error logs and after the last UK server shut down running old code I’m no longer seeing the error below.

groovy.lang.GroovyRunTimeException: Could not find matching constructor for: java.util.Date(java.math.BigInteger)
1 Like

Okay good to know, I’ve personally never faced that issue but other have so I’ll just have to defer to @Dave_George @anwesh and @kraegd for feedback as they’ve been seeing it.

Hi guys - I can confirm that I am no longer having any problems, so thank you very much for your efforts, which along with the speed of your response to our query are much appreciated.

1 Like

Yeh mine looks good too, worked this morning fine :slight_smile:

Thanks guys!

1 Like