Giter Club home page Giter Club logo

Comments (2)

Madd0g avatar Madd0g commented on June 2, 2024 1

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.

aramallo avatar aramallo commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.