Conversation
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @asajeffrey (or someone else) soon. |
|
Heads up! This PR modifies the following files:
|
|
Please add a |
9ce7b52 to
f062693
Compare
|
@bors-servo try=wpt |
Basic IndexedDB Functionality <!-- Please describe your changes on the following line: --> This PR consists of basic functionality for `IndexedDB`. The database engine used is `Rkv`, and might not be the most optimal engine to use, so I created a *pluggable* engine. This makes it easy to change for eventual benchmarks etc. Recently, `Rkv` has raised [warnings](https://github.com/mozilla/rkv) for using it in production, and the plan seems to be to change the backend to sqlite instead. If we expect that IndexedDB is finished after the issues in `Rkv` has been fixed, we should be able to use it after all. The ergonomics of Rkv is really good, and suits IndexedDB quite well. What works: * Basic Open * Basic Put * Basic Add * Basic Get * Basic Remove Some things that don't work: * Key generators * Key ranges * Aborting/Reverting transactions, including upgrades * Closing/Removing a store/db * Injection of keys * Proper scheduling of transactions (they are started immediately atm) * IDBIndex * IDBCursor * Manually committing transactions * Some Error handling is missing * ... lots of other stuff Implementation details worth noting: * Transactions run in a custom thread pool. `read` and `write` transactions use the same pool, which in the future probably should be separate. * IndexedDB is disabled by default, as it has a lot of troubles I am making this PR pre-prematurely, as it is part of a course I take in school (and it's soon due date), so I would be very happy if *reviews can be done rather quickly*. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix (PARTLY) #6963 <!-- Either: --> - [X] These changes do not require tests because: There are many WebIDL tests that we can run to test the code. I was not able to run wpt tests with logging on windows, so test metadata is currently missing. I have, however, run some tests manually, and we can expect some of the tests to `PASS`. Some examples of passing tests: `idbobjectstore_put.htm` `idbobjectstore_put2.htm` `idbobjectstore_put3.htm` `idbobjectstore_put5.htm` `idbobjectstore_put7.htm` `idbobjectstore_put9.htm`, `idbobjectstore_put10.htm` `idbobjectstore_put11.htm` ... `idbfactory_open.htm` `idbfactory_open2.htm` `idbfactory_open3.htm` `idbfactory_open4.htm` ... <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
💔 Test failed - status-taskcluster |
f062693 to
afbe66e
Compare
|
@bors-servo try=wpt |
Basic IndexedDB Functionality <!-- Please describe your changes on the following line: --> This PR consists of basic functionality for `IndexedDB`. The database engine used is `Rkv`, and might not be the most optimal engine to use, so I created a *pluggable* engine. This makes it easy to change for eventual benchmarks etc. Recently, `Rkv` has raised [warnings](https://github.com/mozilla/rkv) for using it in production, and the plan seems to be to change the backend to sqlite instead. If we expect that IndexedDB is finished after the issues in `Rkv` has been fixed, we should be able to use it after all. The ergonomics of Rkv is really good, and suits IndexedDB quite well. What works: * Basic Open * Basic Put * Basic Add * Basic Get * Basic Remove Some things that don't work: * Key generators * Key ranges * Aborting/Reverting transactions, including upgrades * Closing/Removing a store/db * Injection of keys * Proper scheduling of transactions (they are started immediately atm) * IDBIndex * IDBCursor * Manually committing transactions * Some Error handling is missing * ... lots of other stuff Implementation details worth noting: * Transactions run in a custom thread pool. `read` and `write` transactions use the same pool, which in the future probably should be separate. * IndexedDB is disabled by default, as it has a lot of troubles I am making this PR pre-prematurely, as it is part of a course I take in school (and it's soon due date), so I would be very happy if *reviews can be done rather quickly*. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix (PARTLY) #6963 <!-- Either: --> - [X] These changes do not require tests because: There are many WebIDL tests that we can run to test the code. I was not able to run wpt tests with logging on windows, so test metadata is currently missing. I have, however, run some tests manually, and we can expect some of the tests to `PASS`. Some examples of passing tests: `idbobjectstore_put.htm` `idbobjectstore_put2.htm` `idbobjectstore_put3.htm` `idbobjectstore_put5.htm` `idbobjectstore_put7.htm` `idbobjectstore_put9.htm`, `idbobjectstore_put10.htm` `idbobjectstore_put11.htm` ... `idbfactory_open.htm` `idbfactory_open2.htm` `idbfactory_open3.htm` `idbfactory_open4.htm` ... <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
💔 Test failed - status-taskcluster |
|
Run |
|
Huh, those are not the test results I was expecting. Looking at the test harness and databases that are created for each test, it looks like we must be able to create multiple databases with different names.
It looks like this doesn't work at the moment, and everything essentially operates on the same database. I assume this is why e.g. Hopefully, we'll get more sensical test results once it's fixed. |
afbe66e to
ef8bbae
Compare
Basic IndexedDB Functionality <!-- Please describe your changes on the following line: --> This PR consists of basic functionality for `IndexedDB`. The database engine used is `Rkv`, and might not be the most optimal engine to use, so I created a *pluggable* engine. This makes it easy to change for eventual benchmarks etc. Recently, `Rkv` has raised [warnings](https://github.com/mozilla/rkv) for using it in production, and the plan seems to be to change the backend to sqlite instead. If we expect that IndexedDB is finished after the issues in `Rkv` has been fixed, we should be able to use it after all. The ergonomics of Rkv is really good, and suits IndexedDB quite well. What works: * Basic Open * Basic Put * Basic Add * Basic Get * Basic Remove Some things that don't work: * Key generators * Key ranges * Aborting/Reverting transactions, including upgrades * Closing/Removing a store/db * Injection of keys * Proper scheduling of transactions (they are started immediately atm) * IDBIndex * IDBCursor * Manually committing transactions * Some Error handling is missing * ... lots of other stuff Implementation details worth noting: * Transactions run in a custom thread pool. `read` and `write` transactions use the same pool, which in the future probably should be separate. * IndexedDB is disabled by default, as it has a lot of troubles I am making this PR pre-prematurely, as it is part of a course I take in school (and it's soon due date), so I would be very happy if *reviews can be done rather quickly*. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix (PARTLY) #6963 <!-- Either: --> - [X] These changes do not require tests because: There are many WebIDL tests that we can run to test the code. I was not able to run wpt tests with logging on windows, so test metadata is currently missing. I have, however, run some tests manually, and we can expect some of the tests to `PASS`. Some examples of passing tests: `idbobjectstore_put.htm` `idbobjectstore_put2.htm` `idbobjectstore_put3.htm` `idbobjectstore_put5.htm` `idbobjectstore_put7.htm` `idbobjectstore_put9.htm`, `idbobjectstore_put10.htm` `idbobjectstore_put11.htm` ... `idbfactory_open.htm` `idbfactory_open2.htm` `idbfactory_open3.htm` `idbfactory_open4.htm` ... <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
💔 Test failed - status-taskcluster |
fa8a94e to
f27c84f
Compare
|
@bors-servo r+ |
|
📌 Commit f27c84f has been approved by |
Basic IndexedDB Functionality <!-- Please describe your changes on the following line: --> This PR consists of basic functionality for `IndexedDB`. The database engine used is `Rkv`, and might not be the most optimal engine to use, so I created a *pluggable* engine. This makes it easy to change for eventual benchmarks etc. Recently, `Rkv` has raised [warnings](https://github.com/mozilla/rkv) for using it in production, and the plan seems to be to change the backend to sqlite instead. If we expect that IndexedDB is finished after the issues in `Rkv` has been fixed, we should be able to use it after all. The ergonomics of Rkv is really good, and suits IndexedDB quite well. What works: * Basic Open * Basic Put * Basic Add * Basic Get * Basic Remove Some things that don't work: * Key generators * Key ranges * Aborting/Reverting transactions, including upgrades * Closing/Removing a store/db * Injection of keys * Proper scheduling of transactions (they are started immediately atm) * IDBIndex * IDBCursor * Manually committing transactions * Some Error handling is missing * ... lots of other stuff Implementation details worth noting: * Transactions run in a custom thread pool. `read` and `write` transactions use the same pool, which in the future probably should be separate. * IndexedDB is disabled by default, as it has a lot of troubles I am making this PR pre-prematurely, as it is part of a course I take in school (and it's soon due date), so I would be very happy if *reviews can be done rather quickly*. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix (PARTLY) #6963 <!-- Either: --> - [X] These changes do not require tests because: There are many WebIDL tests that we can run to test the code. I was not able to run wpt tests with logging on windows, so test metadata is currently missing. I have, however, run some tests manually, and we can expect some of the tests to `PASS`. Some examples of passing tests: `idbobjectstore_put.htm` `idbobjectstore_put2.htm` `idbobjectstore_put3.htm` `idbobjectstore_put5.htm` `idbobjectstore_put7.htm` `idbobjectstore_put9.htm`, `idbobjectstore_put10.htm` `idbobjectstore_put11.htm` ... `idbfactory_open.htm` `idbfactory_open2.htm` `idbfactory_open3.htm` `idbfactory_open4.htm` ... <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
💔 Test failed - status-taskcluster |
|
Darn - lmdb-rkv-sys contains native Windows code that isn't compatible with UWP builds. The shortest path to success here is to have a dummy IDB backend that's used when |
|
☔ The latest upstream changes (presumably #23545) made this pull request unmergeable. Please resolve the merge conflicts. |
|
🔒 Merge conflict |
1 similar comment
|
🔒 Merge conflict |
|
Closing in favour of #33044. |
Adds indexeddb support to servo. At the moment heed is being used as the backend, although this can be swapped out by implementing `KvsEngine`. This PR adds a thread + a thread pool for Indexeddb related operations. Also `database_access_task_source` is added for Indexeddb related operations. This is a partial rewrite of #25214. (Reopened due to branching issue) Fixes #6963 --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com> Signed-off-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Rasmus Viitanen <rasviitanen@gmail.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This PR consists of basic functionality for
IndexedDB.The database engine used is
Rkv, and might not be the most optimal engine to use, so I created a pluggable engine. This makes it easy to change for eventual benchmarks etc.Recently,
Rkvhas raised warnings for using it in production, and the plan seems to be to change the backend to sqlite instead. If we expect that IndexedDB is finished after the issues inRkvhas been fixed, we should be able to use it after all. The ergonomics of Rkv is really good, and suits IndexedDB quite well.What works:
Some things that don't work:
Implementation details worth noting:
readandwritetransactions use the same pool, which in the future probably should be separate.I am making this PR pre-prematurely, as it is part of a course I take in school (and it's soon due date), so I would be very happy if reviews can be done rather quickly.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThere are many WebIDL tests that we can run to test the code. I was not able to run wpt tests with logging on windows, so test metadata is currently missing. I have, however, run some tests manually, and we can expect some of the tests to
PASS.Some examples of passing tests:
idbobjectstore_put.htmidbobjectstore_put2.htmidbobjectstore_put3.htmidbobjectstore_put5.htmidbobjectstore_put7.htmidbobjectstore_put9.htm,idbobjectstore_put10.htmidbobjectstore_put11.htm...
idbfactory_open.htmidbfactory_open2.htmidbfactory_open3.htmidbfactory_open4.htm...