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-07-21 18:41:59 -07:00
2024-07-24 09:56:42 -07:00
2024-07-22 14:53:31 -07:00
2024-07-16 13:06:31 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-02-29 17:07:16 -08:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:54:32 -07:00
2024-07-14 13:48:32 -07:00
2024-07-19 09:20:56 -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-06-26 16:48:18 -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-14 13:48:32 -07:00
2024-07-13 22:28:22 -07:00
2024-07-22 10:21:22 -07:00
2024-07-22 14:53:31 -07:00
2024-07-13 22:28:22 -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-07-22 10:21:22 -07:00
2024-05-02 14:23:04 -07:00
2024-07-22 10:26:33 -07:00
2024-07-13 22:28:22 -07:00
2024-05-14 16:17:44 -07:00
2024-07-20 15:46:48 -07:00
2024-07-16 23:29:02 -07:00
2024-07-14 13:49:51 -07:00
2024-08-02 14:40:13 -07:00
2024-07-24 09:53:14 -07:00
2024-07-17 15:56:00 -07:00
2024-07-16 23:29:02 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:48:32 -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-14 13:49:51 -07:00
2024-07-16 23:29:02 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:49:51 -07:00
2024-04-24 14:35:05 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-03-19 18:22:24 -04:00
2024-07-13 22:28:22 -07:00
2024-07-04 07:56:31 -07:00
2024-07-13 22:28:22 -07:00
2023-12-16 22:08:44 -08: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:48:32 -07:00
2024-07-13 22:28:22 -07:00
2024-07-17 17:14:06 -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-07-14 13:48:32 -07:00
2024-07-04 07:56:31 -07:00
2023-12-16 22:08:44 -08:00
2024-07-14 13:48:32 -07:00
2024-07-14 13:48:32 -07:00
2024-07-13 22:28:22 -07:00
2023-12-16 22:08:44 -08:00
2024-07-22 14:53:31 -07:00
2024-04-24 14:35:05 -07:00
2024-07-16 23:29:02 -07:00
2024-07-17 15:56:00 -07:00
2024-07-14 22:32:36 -07:00
2024-07-13 22:28:22 -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-07-22 14:53:31 -07:00
2024-07-16 13:06:31 -07:00
2024-07-13 22:28:22 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:48:32 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:48:32 -07:00
2024-07-21 12:57:50 -07:00
2024-07-24 16:04:34 -07:00
2024-04-18 11:50:38 -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-09 13:08:02 -07:00
2024-07-20 15:46:48 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:48:32 -07:00
2024-07-16 13:22:15 -07:00
2024-07-16 13:22:15 -07:00
2024-07-19 09:20:56 -07:00
2024-06-17 10:42:32 -07:00
2024-07-13 22:28:22 -07:00
2024-07-14 13:48:32 -07:00
2024-07-13 22:28:22 -07:00
2024-07-15 16:49:32 -07:00
2024-08-01 11:24:58 -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-06-30 22:45:26 -07:00
2024-07-13 22:28:22 -07:00
2024-07-04 07:56:31 -07:00