Comments (7)
@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.
Fixed by c5d5ee7.
from django-cachalot.
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.
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.
@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.
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.
Version 1.4.0 is out, including this fix!
from django-cachalot.
Related Issues (20)
- Does not support Django 4.1 HOT 3
- Allow enum-likes in CACHABLE_PARAM_TYPES HOT 1
- Tables defined in CACHALOT_UNCACHABLE_APPS are still being cached
- UncachableQuery raised when exporting models of table even if listed in `CACHALOT_UNCACHABLE_APPS`. HOT 3
- Does django-cachalot lib support the new django.core.cache.backends.redis.RedisCache cache backend in Django version 4.0? HOT 4
- using override_settings(CACHALOT_ENABLED=False) has no effect HOT 2
- Using timestamps considered harmful HOT 2
- NoneType error when saving UserProfileAdmin after Django 4.1 update
- Support Django 4.2
- Docs are not getting rendered correctly
- Update records after bulk_update many objects
- Is there a recommended way to turn off cachalot on a production DB without any downtime? HOT 2
- Why is my cache not invalidated? HOT 1
- Msssql future support HOT 2
- Cachalot tries to create a database connection on import HOT 4
- If redis is unavailable during migration, migration is applied but not inserted into migration table.
- Patched cursor does not expect psycopg2 sql Composed Object HOT 4
- Django 5 support HOT 2
- Renew timeout when query is accessed via cache
- Query which filters on annotation of second query does not have cache invalidated 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 django-cachalot.