Skip to content
This repository has been archived by the owner on Aug 28, 2019. It is now read-only.

writeDoubleBE: AssertionError: value larger than maximum allowed value #11

Open
fengmk2 opened this issue May 4, 2013 · 2 comments
Open
Labels

Comments

@fengmk2
Copy link
Collaborator

fengmk2 commented May 4, 2013

assert.js:102
  throw new assert.AssertionError({
        ^
AssertionError: value larger than maximum allowed value
    at verifIEEE754 (buffer.js:1015:10)
    at writeDouble (buffer.js:1150:5)
    at Buffer.writeDoubleBE (buffer.js:1162:3)
    at ConnectRequest.toBuffer (/Users/mk2/git/node-hbase-client/node_modules/zookeeper-watcher/node_modules/zkjs/protocol/connect.js:30:8)
    at Client.send (/Users/mk2/git/node-hbase-client/node_modules/zookeeper-watcher/node_modules/zkjs/client.js:34:22)
    at Ensemble.write (/Users/mk2/git/node-hbase-client/node_modules/zookeeper-watcher/node_modules/zkjs/ensemble.js:62:15)
    at Session.login (/Users/mk2/git/node-hbase-client/node_modules/zookeeper-watcher/node_modules/zkjs/session.js:378:17)
    at Ensemble.clientConnect (/Users/mk2/git/node-hbase-client/node_modules/zookeeper-watcher/node_modules/zkjs/ensemble.js:132:16)
    at Client.EventEmitter.emit (events.js:93:17)
    at Object.afterConnect [as oncomplete] (net.js:752:10)
@fengmk2
Copy link
Collaborator Author

fengmk2 commented May 4, 2013

When I mock network broken and after 1 minute recover, it comes out this error.

@dannycoates
Copy link
Owner

This might be as easy as data.writeDoubleBE(this.lastZxid, 4, true) to turn off the assertions anywhere we write a ZXID. If using noAssert corrupts the value, I think we must use Buffers for ZXIDs. I was trying to use a double as an opaque 64-bit value to save from having to use a Buffer.

What is the value of this.lastZxid when you get the error?

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

No branches or pull requests

2 participants