Alex Vandiver
656ca17e14
thumbnail: Resolve a race condition when rendering messages.
...
Messages are rendered outside of a transaction, for performance
reasons, and then sent inside of one. This opens thumbnailing up to a
race where the thumbnails have not yet been written when the message
is rendered, but the message has not been sent when thumbnailing
completes, causing `rewrite_thumbnailed_images` to be a no-op and the
message being left with a spinner which never resolves.
Explicitly lock and use he ImageAttachment data inside the
message-sending transaction, to rewrite the message content with the
latest information about the existing thumbnails.
Despite the thumbnailing worker taking a lock on Message rows to
update them, this does not lead to deadlocks -- the INSERT of the
Message rows happens in a transaction, ensuring that either the
message rending blocks the thumbnailing until the Message row is
created, or that the `rewrite_thumbnailed_images` and Message INSERT
waits until thumbnailing is complete (and updated no Message rows).
(cherry picked from commit 6f20c15ae9 )
2024-08-02 14:40:13 -07:00
..
2024-08-02 14:40:13 -07:00
2024-07-18 13:50:28 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2023-10-12 12:28:41 -07:00
2024-07-13 22:28:22 -07:00
2024-07-07 14:40:07 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:52:59 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:53:18 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:49:51 -07:00
2024-07-14 13:48:32 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-04-17 16:49:03 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:52:59 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-22 22:31:45 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2023-08-23 16:18:15 -07:00
2024-07-12 13:26:47 -07:00
2024-07-13 22:28:22 -07:00
2024-07-22 10:21:22 -07:00
2024-07-19 09:24:54 -07:00
2024-07-16 13:22:15 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:49:51 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-21 13:16:49 -07:00
2024-07-13 22:28:22 -07:00
2024-07-20 15:44:17 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-12 13:26:47 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-02 10:04:34 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-16 14:50:30 -07:00
2024-07-14 13:53:40 -07:00
2024-07-13 22:28:22 -07:00
2024-07-16 13:52:30 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:53:40 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-17 17:14:06 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:53:40 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-17 17:14:06 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 22:30:28 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:48:32 -07:00
2024-07-14 13:52:59 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:53:18 -07:00
2024-07-21 18:41:59 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:52:59 -07:00
2024-07-19 09:20:56 -07:00
2024-07-16 13:22:15 -07:00
2024-07-13 22:28:22 -07:00
2024-08-02 14:40:13 -07:00
2024-07-13 22:28:22 -07:00
2023-12-05 12:01:18 -08:00
2024-07-13 22:28:22 -07:00
2024-07-16 14:50:30 -07:00
2024-07-13 22:28:22 -07:00
2024-07-12 13:26:47 -07:00
2024-07-21 12:57:50 -07:00
2024-07-21 12:57:50 -07:00
2024-07-17 17:14:06 -07:00
2024-06-17 10:42:32 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-08-01 11:24:58 -07:00
2024-07-13 22:28:22 -07:00
2024-07-20 15:46:48 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-25 13:19:25 -07:00