Git Product home page Git Product logo

Comments (7)

Linden6 avatar Linden6 commented on June 10, 2024 2

With the current version (0.9.14), I believe the SBCL workaround should be:

(setf dexador.connection-cache::*threads-connection-pool*
        (make-hash-table :test 'equal :synchronized t))

not as given above as:

(setf cl-dbi::*threads-connection-pool*
        (make-hash-table :test 'equal :synchronized t))

from dexador.

vindarel avatar vindarel commented on June 10, 2024 1

(nit: your title is truncated)

from dexador.

svetlyak40wt avatar svetlyak40wt commented on June 10, 2024

@vindarel probably I just didn't finish it. Now it is fixed.

By the way, I've seen a similar error in Ultralisp.org's logs.

Sometimes it stop working because of that and I have to restart docker container :(
We need to invest some time and to fix it.

from dexador.

svetlyak40wt avatar svetlyak40wt commented on June 10, 2024

This issue is similar to fukamachi/cl-dbi#46 a lock should be added to guard hash from parallel modifications.

Or maybe some lock free structure like http://quickdocs.org/cl-skip-list/ could be used.

from dexador.

hjudt avatar hjudt commented on June 10, 2024

I've used cl-skip-list once, but in practice and for my use-case its performance was inferior to sbcl synchronized hash-table, and likely that will be also enough for most people. probably for sbcl only unfortunately, a very easy fix is to use (make-hashtable :synchronized t).

from dexador.

svetlyak40wt avatar svetlyak40wt commented on June 10, 2024

@fukamachi probably here https://github.com/fukamachi/cl-dbi/blob/7ba050dea8d137c1f85b7e704d4fc945104bf283/src/cache/thread.lisp#L19-L21 we need to use bt:with-lock-held because hash is modified and this is not a thread safe operation.

from dexador.

svetlyak40wt avatar svetlyak40wt commented on June 10, 2024

Thank you, @Linden6! Original post includes the code for cl-dbi, which has a similar problem.

from dexador.

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.