Coder Social home page Coder Social logo

Comments (5)

MartinR-PCS avatar MartinR-PCS commented on July 20, 2024

When I connect to connection defined RW in SQL tools it immediately blocks any access to the file with error "... is being used by another process" => I'm not able to send any query or close the connection then
Driver version: 0.0.4
SQLTools: 0.28.0
VSCode: 1.83.1

from sqltools-duckdb-driver.

alex-gable avatar alex-gable commented on July 20, 2024

Also facing this bug. This extension doesn't release the lock upon disconnect. You have to quit vscode entirely.

Also, this shouldn't be necessary at all when the connection is set as read-only

from sqltools-duckdb-driver.

alex-gable avatar alex-gable commented on July 20, 2024

@archiewood I think the issue is fairly straightforward actually. I noticed this doesn't happen when you test the connection, which should have the same functionality as a READ_ONLY saved connection. So, what's the difference?

in testConnection we await this.close().

In close, we do not await. We're likely setting the connection to null before the closing happens.

I don't have a way to test this, but it should be a 60s change tbh.

from sqltools-duckdb-driver.

alex-gable avatar alex-gable commented on July 20, 2024

I attempted to make this change above. it certainly makes an improvement but is still flaky, That said, I was able to find the true culprit

When you disconnect and close out of all windows (results, *.session.sql, any *.sql file), there's still a lingering language server process. killing that PID will release the duckdb connection (and a new sqltools language server process will spin up)

from sqltools-duckdb-driver.

archiewood avatar archiewood commented on July 20, 2024

@alex-gable thanks for the digging.

Will happily accept a PR if you find anything to make it less flaky!

from sqltools-duckdb-driver.

Related Issues (12)

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.