Comments (3)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from forget.
hello. i think i've figured this out. it looks like postgres does not lock all the rows in a SELECT .. FOR UPDATE
at once atomically. since we order rows by random(), this means one transaction might lock post A and then post B, while another locks post B and then post A
one way to fix this, since we only need a random sample of posts and don't necessarily need all 100 posts that were picked, would be to SELECT ... FOR UPDATE SKIP LOCKED
which would just skip rows that were already locked, and avoid a deadlock
however i think there is a larger problem here. it seems unwise to lock a hundred rows and then go off making potentially slow http requests, up to 101 of them in mastodon's case
from forget.
btw the reason why we lock those rows FOR UPDATE
is because of an other similar deadlock that would happen without that explicit lock. not sure why that one would happen but it is likely that it was because of locking in random order as well
from forget.
Related Issues (20)
- Post delete turning up 404? HOT 1
- New endpoint to add arbitrary statuses HOT 1
- New component for uploading archives HOT 2
- idea: support deleting only certain types HOT 1
- Question: Favorite feature? HOT 2
- forget down??? HOT 1
- Misskey support
- no deletion is happening HOT 2
- [Feature request] Support to only delete replies on Mastodon
- Stuck again? HOT 4
- https://forget.codl.fr/ Down? HOT 5
- Warn user if deletion frequency is likely to hit a rate limit
- Add Minds.com support HOT 2
- what happens if fetch_current_batch_end is deleted before the batch is done being fetched?
- Remove dynamic brotli stuff?
- Not Showing Total Posts HOT 7
- Some of my posts are not being deleted / tracked!
- restore ci
- forget.codl.fr is down HOT 1
- versioneer and docker
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 forget.