Git Product home page Git Product logo

Comments (7)

BertrandBordage avatar BertrandBordage commented on June 14, 2024 1

@jklardie You’re right, thanks for the detailed report. I vaguely assumed no-one would execute two times the same SELECT FOR UPDATE, but it was a bad assumption. I’ll soon release a new version with this fixed!

from django-cachalot.

BertrandBordage avatar BertrandBordage commented on June 14, 2024 1

Fixed by c5d5ee7.

from django-cachalot.

erikwt avatar erikwt commented on June 14, 2024

I can vouch for this. We ran into concurrency issues on our production environment. Not caching select_for_update like described by OP fixed this.

from django-cachalot.

jklardie avatar jklardie commented on June 14, 2024

FYI: in my system this occurs where such queries are triggered via Ajax requests. In environments where the user has bad connection, multiple requests sometimes get stacked and reach our server simultaneously.

from django-cachalot.

BertrandBordage avatar BertrandBordage commented on June 14, 2024

@jklardie: Why did you add select_for_update_nowait? From what I understand, it cannot be True without select_for_update (see lines 828-840 of query.py).

from django-cachalot.

jklardie avatar jklardie commented on June 14, 2024

You are right, I was not aware of this. I wrongly assumed Django handled them exclusively. I will update my initial post.

from django-cachalot.

BertrandBordage avatar BertrandBordage commented on June 14, 2024

Version 1.4.0 is out, including this fix!

from django-cachalot.

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.