-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raise_record_not_found_exception #3388
Comments
I have the same issue here. That very much looks like a race condition, as the record that can't be found is created right before calling the worker. I looked a bit at why it only happened in ThreadResolveWorker, and it's probably not because the other workers avoid race conditions, but instead because they fail silently when such an error occurs ( EDIT: I'm indeed pretty sure the workers often get to run before the transactions are actually committed to the database, so this is actually a bug, and not only in ThreadResolveWorker, but also in all workers silently ignoring this exception. Those workers need to run after the transactions are committed, but I don't know how to do that. |
This is still an issue, even after #3599. The problem is essentially that create_status is re-entrant: indeed, if the processed toot is a boost, This is a bit more tricky than the error fixed by #3599 and I'm not completely sure how to handle that, nor have I the time to look into this right now. |
@ThibG http://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html#module-ActiveRecord::Transactions::ClassMethods-label-Nested+transactions? Maybe a requires_new: true on the transaction block will do the trick. |
Actually, I think I have an idea on how to handle that, but it'll have to wait a few hours for me to be back from $dayjob |
…ore transaction block Steps to reproduce the original issue: 1. Have two remote accounts, A that you don't follow, and B that you follow. 2. Have A post a toot and reply to it. 3. Boost A's reply from remote account B. This used to cause the local instance to get A's reply but fail to link it to the original post.
…ore transaction block (mastodon#3622) Steps to reproduce the original issue: 1. Have two remote accounts, A that you don't follow, and B that you follow. 2. Have A post a toot and reply to it. 3. Boost A's reply from remote account B. This used to cause the local instance to get A's reply but fail to link it to the original post.
I have started noticing these exceptions in the background workers log. It's possible, though I'm not certain, they started after upgrading to 1.4rc5.
The text was updated successfully, but these errors were encountered: