Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum Version Number #1072

Open
grydstedt opened this issue May 23, 2020 · 4 comments
Open

Maximum Version Number #1072

grydstedt opened this issue May 23, 2020 · 4 comments
Labels

Comments

@grydstedt
Copy link

grydstedt commented May 23, 2020

Seeing this when running a server for a long time. Client Version 4.1.3.

Completely locks up the server

RECORD_UPDATE_ERROR | RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= -2147483648 and <= 2147483647. Received 2151554877

Presumably something incrementing past integer max.

@yasserf
Copy link
Contributor

yasserf commented May 23, 2020

Easiest way to deal with this is to do rolling. If the number is 2147483647 then go back to zero. Will end up having all the clients needing to just accept remote.

Best way of doing that is probably sending out a custom message inform clients to do so via the protocol. It's aint great, but the client would break eitherways due to same error.

I'm no longer maintaining ds, happy to accept a patch if anyone raises it.

Easiest way to test would be to use setData(name, 2147483646, data) api and then updating normally.

@yasserf yasserf added the bug label May 23, 2020
@yasserf
Copy link
Contributor

yasserf commented May 29, 2020

@grydstedt to be clear, as long as you don’t need server side merging, if you stick, to using ‘set’ without paths, enable the hot path prefix on the server config to include your record pattern and ensure the client side merge resolution is accept remote for that pattern it will work by forcing the version to 1 without you needing a patch.

@yasserf yasserf changed the title RangeError [ERR_OUT_OF_RANGE] Maximum Version Number Jul 4, 2020
@yasserf
Copy link
Contributor

yasserf commented Jul 4, 2020

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt

This will actually fix the issue on the server, just needs to polyfilled on Client

@grydstedt
Copy link
Author

Haven't had time to look at a fix for this unfortunately. For now we'll have to restart the server on some interval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants