Comments (2)
so that's what's been happening to me!
I have a development server that is restarts on any change to the code and it has worked beautifully for me for a while now, no lock errors.
But then I wrote some tests, and the tester in watch mode destroys and then creates the DB in quick succession and often it blows up on not being able to achieve a lock on the file.
It would be great if it was a promise that resolves after everything is actually closed.
from cozo.
So far I managed to use the same technique you are using on the C bindings. That is, I create a struct to keep track of the handles created with DBInstance.new and allow the user to call close(id)
which removes the handle and thus Rust destroys the instance. The issue still is that engines like RocksDB will take some time to tear down which might lead to a race condition when immediately tryin to re-open the same database (as the rocksdb files are locked).
So it would be nice to have a close function that waits for RocksDB termination.
from cozo.
Related Issues (20)
- Future plans and sponsorship? HOT 5
- Feature request: Add support for cloudflare d1 (serverless sqlite) HOT 3
- `export_relations` call signature for web wasm runtime
- ls it possible to move data between graphs and relations HOT 1
- Build fails on Linux. HOT 1
- Build fails on Linux. HOT 3
- Implement IntoIterator for NamedRows
- borrowed data escapes outside of method HOT 3
- Any plans to support query pagination
- Bug in OR function HOT 1
- tuple comparison HOT 1
- any plans to support persistence for Browser like leveldb HOT 3
- Rocks DB errors on node wrapper HOT 1
- Possible bug in `:rm` operation HOT 3
- Cozo server says it's binding to port 9070 but actually binds to port 3000 HOT 2
- Cannot include escaped doublequote character in string HOT 8
- Feature request: be able to build queries directly in rust, bypassing the script parser HOT 2
- What is the params argument for in the C library? HOT 1
- RFC: `cozo-migrate`, a simple migrations library for cozo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cozo.