josephg / node-foundationdb

Modern Node.js FoundationDB bindings
Other
115 stars 17 forks source link

API 630 Support #52

Closed ex3ndr closed 2 years ago

ex3ndr commented 3 years ago

Do you have any plans to upgrade API to 630 with transaction tagging support (https://github.com/apple/foundationdb/pull/2942) ?

josephg commented 3 years ago

Oh I missed that change. We can do that - interested in putting together a PR?

ex3ndr commented 3 years ago

I wish I could! But i will try to recruit someone from our team!

ex3ndr commented 3 years ago

Oof it seems it only needed to regenerate opts for this and no native coding required will do then!

ex3ndr commented 3 years ago

https://github.com/josephg/node-foundationdb/pull/53

josephg commented 3 years ago

Too easy :) thanks for the PR. I’ll publish a new version to npm later today.

josephg commented 3 years ago

📦️ foundationdb@1.1.0

ex3ndr commented 3 years ago

I forgot to bump maximum allowed version: https://github.com/josephg/node-foundationdb/pull/54

josephg commented 3 years ago

Cool. Merged and released as 1.1.1

ex3ndr commented 3 years ago

Yet another place :( https://github.com/josephg/node-foundationdb/pull/55

josephg commented 3 years ago

Can you check that your PR actually fixes the issue before I merge it this time?

ex3ndr commented 3 years ago

Done!

1) Updated build script to use new fdb binaries (6.3.12) + fixed creation of data directory during build 2) Updated API version for tests to 630

Everything seems to work now.

josephg commented 3 years ago

... Sorry I've been dragging my heels on this. The installer for 6.3.12 is broken, which in turn means the CI can't run. Apparently its been fixed with 6.3.13

https://github.com/apple/foundationdb/issues/4789

hengsok commented 3 years ago

Hi @josephg, when we try to set the API Version to 630, we got this error during run time.

FDBError: API version not valid node_modules/foundationdb/dist/lib/apiVersion.js:37:30

Error happen at native_1.default.setAPIVersion(version);

This error happens with the latest fdb 6.3.15.

Thanks

josephg commented 3 years ago

Hi! I ran into issues deploying because the scripts are trying to build the library for windows, but windows support in foundationdb is being slowly deprecated - and the windows build is missing / broken.

I've just re-deployed foundationdb@1.1.2, which should have working support for protocol version 630. Give that a crack @hengsok.

Thanks @ex3ndr - sorry for dragging my feet!

hengsok commented 3 years ago

@josephg thanks so much for the awesome work for this js lib. You really put in a lot of effort in it as I have looked through majority of your code including the fdp-tuple. Just curious, where do you work at? Do you fork this library from the original author and continue to polish/improve it just for hobby? You seem to have a very good understanding of both Javascript and fdb.  👍🏻

Anyway, the description regarding "start ≥ key > end" under "Range reads" seems weird. Shouldn't it be "start<= key < end"?

josephg commented 3 years ago

Aw thanks! I'm at the moment working on braid as part of the invisible college. Yeah I maintain this mostly as a hobby - though it honestly doesn't need much maintenance at this point. This code started as a fork, but I don't know if any of the original code remains. The native module was rewritten to support napi, and the javascript code was rewritten into typescript with promises rather than JS with callbacks.

As for the range reads thing - yeah, well spotted. Looks like a typo.

hengsok commented 3 years ago

Nice good job! Great you are working on something interesting there. I think you did an excellent job at writing the documentation. It is pretty detailed although when I need additional features, I just dig through your lib directly. :) Such as setting RetryLimit, CausalReadRisky etc. :D It is good you had those options in there. There are many hidden gems in the code.

josephg commented 3 years ago

Yeah thanks. Those options are exposed by libfdb_c, which is the raw bindings library maintained by the foundationdb team. They're all exposed & documented through typescript type definitions at least.