cinnyapp / cinny

Yet another matrix client
https://cinny.in
GNU Affero General Public License v3.0
1.87k stars 242 forks source link

Replied-to messages which are loaded aren't rendered after loading completes #231

Closed TheBlueMatt closed 2 years ago

TheBlueMatt commented 2 years ago

When a channel is opened where the latest message replies to a message which isn't cached and has to be loaded, the box with the replied-to message is (obviously) a grey box. This is fine, except that even after the replied-to message loads and is rendered, the replied-to message box remains grey and isn't re-rendered. Clicking into a different channel and back makes it render just fine. Cinny v1.6.1 on Firefox.

ajbura commented 2 years ago

Is this happen with all replies all times or sometimes?

TheBlueMatt commented 2 years ago

I believe all-the-time, though I haven't done any kind of exhaustive testing - I've at least seen it in unencrypted rooms, so maybe its specific to that.

kfiven commented 2 years ago

It'd be great if we can have steps to reproduce this behaviour otherwise there's no way to know what is going wrong.

TheBlueMatt commented 2 years ago

I believe its basically "dont open a channel for a few days so that no recent messages are in cache, have the last few messages in a channel be replies to things from 10 messages up, load the channel in cinny" at that point cinny will load the most recent few messages on start, but not the messages 10-messages-back which the latest message(s) were a reply to, and will fail to re-render the reply-to blocks after the previous messages are loaded.

ajbura commented 2 years ago

Forget to ask earlier, what’s your homeserver @TheBlueMatt ?

TheBlueMatt commented 2 years ago

The homeserver is a self-hosted one. Indeed, when I was seeing this issue regularly it had incredibly slow IOPS (read: microSD card for Postgres). I've since had a chance to replace the backing storage and the issue seems to have largely resolved. I assume mostly whatever race condition leads to this is rare enough on reasonably-performant homeservers that it may not be worth worrying about.

ajbura commented 2 years ago

I asked about homeserver because I faced this on a conduit homeserver and thought maybe it’s related to conduit.

Anyways if you feel this is related to homeserver speed then feel free to close it as we can’t do much in that direction.

TheBlueMatt commented 2 years ago

I asked about homeserver because I faced this on a conduit homeserver and thought maybe it’s related to conduit.

Ah, sorry, no, this was on synapse.

Anyways if you feel this is related to homeserver speed then feel free to close it as we can’t do much in that direction.

It wasn't timeouts, though, so its still a bug, just a rare one that seems likely to be some kind of race condition. IOW it seems low priority, though users on incredibly-slow-IOPS homeservers may see it somewhat regularly.

ajbura commented 2 years ago

Steps to reproduce:

@TheBlueMatt You did something like that where those replies failed?

TheBlueMatt commented 2 years ago

Yes. I've started seeing it again somewhat, so its not just a synapse-being-slow issue, haven't tried with 1.7 yet, however.