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

Older versions of leveldown are broken on node 10 #455

Closed
ralphtheninja opened this issue Apr 28, 2018 · 10 comments
Closed

Older versions of leveldown are broken on node 10 #455

ralphtheninja opened this issue Apr 28, 2018 · 10 comments

Comments

@ralphtheninja
Copy link
Member

It turns out older versions of leveldown are broken on node 10 so if there aren't any prebuilt binaries (which is highly unlikely since we haven't built any for node 10 on older versions) installs must be able to build leveldown, which they can't.

It seems to me that v2.0.2 and above works with node 10 (albeit some deprecation warnings) but v2.0.1 and below are broken.

See #448 for background.

Build error:

In file included from ../node_modules/nan/nan.h:192:0,
                 from ../src/leveldown.h:11,
                 from ../src/database.cc:12:
../node_modules/nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’:
../node_modules/nan/nan_maybe_43_inl.h:112:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
   return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
               ^~~~~~~~
In file included from ../node_modules/nan/nan.h:192:0,
                 from ../src/batch.cc:3:
../node_modules/nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’:
../node_modules/nan/nan_maybe_43_inl.h:112:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
   return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
               ^~~~~~~~
In file included from ../node_modules/nan/nan.h:192:0,
                 from ../src/database.h:16,
                 from ../src/database_async.cc:12:
../node_modules/nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’:
../node_modules/nan/nan_maybe_43_inl.h:112:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
   return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
               ^~~~~~~~
@vweevers
Copy link
Member

Considering the age of node 10 (4 days) and the age of leveldown 2.0.1 (6 months), that's perfectly acceptable IMO.

@ralphtheninja
Copy link
Member Author

Considering the age of node 10 (4 days) and the age of leveldown 2.0.1 (6 months), that's perfectly acceptable IMO.

Maybe acceptable for now. The question is what to do about it. If we should do something about it.

@vweevers
Copy link
Member

vweevers commented Apr 28, 2018

Should we do something about it?

EDIT: Poll locked.

screenshot from 2018-07-08 12-57-39

@MongoExpUser
Copy link

I had the same problem when I upgraded to Node 10.

After looking around, I tried several versions of Leveldown. Eventually, I came to the same conclusion as ralphtheninja stated above.

Only Leveldown v 2.0.2 looks like the only solution for now...

@ralphtheninja
Copy link
Member Author

Only Leveldown v 2.0.2 looks like the only solution for now...

v2.0.2 and above should work, e.g. v2.1.0, v2.1.1, v3.0.0 and v3.0.1.

@MongoExpUser
Copy link

MongoExpUser commented Apr 30, 2018

ralphtheninja,
I have been working on this for almost 3 days. I tried versions above 2.0.2 with no luck. I systematicallly tested all the version from 1.7.2 upward...

Only version 2.0.2 keeps my Level DB Server running without any crash or error or lock-up.

I guess my situation might be different since what I am actually using is Level-party (for clusters/multi-processes/multi-processors) which bundled Level 1.7.0 and Leveldown 1.7.2 as dependencies.

So, I changed the Leveldown dependency within Level-party from 1.7.2 to 2.0.2 and the Level DB Server finally worked as expected.

@ralphtheninja
Copy link
Member Author

Only version 2.0.2 keeps my Level DB Server running without any crash or error or lock-up.

What kind of crashes, errors or lock-ups are you having? This is valuable information to us. It would be really nice if you could share it.

@MongoExpUser
Copy link

MongoExpUser commented Apr 30, 2018

ralphtheninja,
Thank you very much for your last post. There are broadly two categories in general:

  1. Could not compile some dependencies with node-gyp.
  2. Lock-up of Leveldb when 2 or more processes try to access the db. Again, this is related to level-party internal workings and dependencies.

These errors are now resolved as I mentioned in my earlier post.

@MongoExpUser
Copy link

@christianbundy
Thanks for the update. I have now updated my server to use the latest version of Leveldown (version 3.0.1) and it is working fine...

@vweevers
Copy link
Member

Please see UPGRADING.md:

If you're using node v10 you'll need at least leveldown@2.0.1 to successfully compile. In addition, if you want prebuilt binaries you'll need at least leveldown@3.0.1.

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

3 participants