-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
sqlite: add fast api to DatabaseSync.isTransaction #57952
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
base: main
Are you sure you want to change the base?
Conversation
Review requested:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #57952 +/- ##
==========================================
- Coverage 90.27% 90.27% -0.01%
==========================================
Files 630 630
Lines 186328 186343 +15
Branches 36503 36503
==========================================
+ Hits 168205 168217 +12
- Misses 11001 11009 +8
+ Partials 7122 7117 -5
🚀 New features to boost your workflow:
|
The crash happens in the test on this line: eval('%PrepareFunctionForOptimization(db.isTransaction)');
|
@joyeecheung @jasnell maybe you know? |
I do not know, sorry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can try expose it via getter on https://github.com/nodejs/node/blob/02849f83978debf8fb66453bfbae0ab7ae2cb07a/lib/sqlite.js, and then add the fastAPI in a method exposed by the sqlite binding.
02849f8
to
889a597
Compare
@cjihrig @H4ad With the help of @erikcorry we found the issue, it seems the issue is with optimizing functions through |
889a597
to
cbce897
Compare
Interesting. That seems like something worth documenting in https://github.com/nodejs/node/blob/main/doc/contributing/adding-v8-fast-api.md. |
I'll open a PR but first I need to wait for a response at the v8-dev - https://groups.google.com/g/v8-dev/c/Mr-1Dx7clBY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note: Do we have benchmarks for sqlite (at least I didn't found)? I don't doubt this will help, but would be great to have something to compare and see the improvements
I don't think there is, but we should definitely have. It seems the tests are not passing because fast path counter isn't increased. I wonder if the fast path isn't invoked because we're testing it on debug builds? Can it be possible @targos @joyeecheung? |
dbf13de
to
80f5503
Compare
80f5503
to
5a9ad71
Compare
I will open a PR to add some benchmarks |
This might be a good start to add v8 fast api before we stabilize sqlite. I couldn't find the build error. Maybe @cjihrig might help?
For reproduction, run: make && tools/test.py test/parallel/test-sqlite-database-sync.js