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

readUnitProps fails with 'different props' on equal units #85

Closed
pmiklos opened this issue Feb 18, 2018 · 3 comments
Closed

readUnitProps fails with 'different props' on equal units #85

pmiklos opened this issue Feb 18, 2018 · 3 comments

Comments

@pmiklos
Copy link
Contributor

pmiklos commented Feb 18, 2018

Using mysql database, seemingly equal units are reported as different when comparing cached and db versions:

unit null, best parent 3BoTBCE4yfFKL1kmyCJmO0d1E8xKA9Qom3MKdu4HveA=, wlevel 29444
node_modules/mysql/lib/protocol/Parser.js:80
        throw err; // Rethrow non-MySQL errors
        ^

Error: different props of 3BoTBCE4yfFKL1kmyCJmO0d1E8xKA9Qom3MKdu4HveA=, mem: {"unit":"3BoTBCE4yfFKL1kmyCJmO0d1E8xKA9Qom3MKdu4HveA=","level":29445,"latest_included_mc_index":null,"main_chain_index":null,"is_on_main_chain":0,"is_free":1,"is_stable":0,"witnessed_level":29444}, db: {"unit":"3BoTBCE4yfFKL1kmyCJmO0d1E8xKA9Qom3MKdu4HveA=","level":29445,"latest_included_mc_index":null,"main_chain_index":null,"is_on_main_chain":0,"is_free":1,"is_stable":0,"witnessed_level":29444}
    at node_modules/byteballcore/storage.js:714:12
    at Query._callback (node_modules/byteballcore/mysql_pool.js:43:4)
    at Query.Sequence.end (node_modules/mysql/lib/protocol/sequences/Sequence.js:88:24)
    at Query._handleFinalResultPacket (node_modules/mysql/lib/protocol/sequences/Query.js:139:8)
    at Query.EofPacket (node_modules/mysql/lib/protocol/sequences/Query.js:123:8)
    at Protocol._parsePacket (node_modules/mysql/lib/protocol/Protocol.js:279:23)
    at Parser.write (node_modules/mysql/lib/protocol/Parser.js:76:12)
    at Protocol.write (node_modules/mysql/lib/protocol/Protocol.js:39:16)
    at Socket.<anonymous> (node_modules/mysql/lib/Connection.js:103:28)
    at emitOne (events.js:116:13)
@tonyofbyteball
Copy link
Member

looks odd... Is it reported for every unit or just 3BoTBCE4yfFKL1kmyCJmO0d1E8xKA9Qom3MKdu4HveA= is unlucky?

@pmiklos
Copy link
Contributor Author

pmiklos commented Feb 25, 2018

no, it happens with other units too, if I work around that code and then sync some more items, then re-enable that code, I get it the error again, eg:

Error: different props of BLydEZJllE2uUH+wg7CiGDWdabwfBUxhoCAA0Tb2xHw=, mem: {"unit":"BLydEZJllE2uUH+wg7CiGDWdabwfBUxhoCAA0Tb2xHw=","level":29751,"latest_included_mc_index":null,"main_chain_index":null,"is_on_main_chain":0,"is_free":1,"is_stable":0,"witnessed_level":29750}, db: {"unit":"BLydEZJllE2uUH+wg7CiGDWdabwfBUxhoCAA0Tb2xHw=","level":29751,"latest_included_mc_index":null,"main_chain_index":null,"is_on_main_chain":0,"is_free":1,"is_stable":0,"witnessed_level":29750}

It is thrown using the headless-byteball with npm release of 0.2.87. The witness and hub runs the devnet and are running a little older version.

@tonyofbyteball
Copy link
Member

Fixed, it happened because row objects returned by mysql have their own type

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

No branches or pull requests

2 participants