Implementation can cause major inconsistencies and missed messages
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
Direzione di ricerca
Inizia da channelService.init() e channelService.loadMoreChannels(), quindi traccia come channelSubject e this.channels.length determinano gli offset della paginazione. Riproduci il caso has_unread mentre i messaggi vengono letti o i canali arrivano tramite websocket; il lavoro è completato quando i caricamenti successivi non saltano né tralasciano i canali corrispondenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello,
There is a bug which can cause a user to never see some messages in the UI given the way that the Angular SDK is written.
Essentially, the problem is that the current way of handling pagination in the SDK works for only the most simplistic of cases. It doesn't take into account the filters. This can only be explained by way of example:
Let's say that you have 500 channels. And let's also say that you are using a filter of has_unread. Now, there is already a problem where if you have over 100 unread channels this filter doesn't work properly (known issue). But let's assume for a moment that problem isn't in play because we have less than 100 unread channels. For our example, let's also assume that we are loading 10 channels at a time, as it'll make the problem more apparent.
We call channelService.init() and load the initial batch of channels. Assume we have 30 unread channels. We've loaded 10 unread channels. Now, we load the next batch of 10 by calling channelService.loadMoreChannels(). This queries the channels again with the same filter and an offset of 10, since that's the current count of the channel list.
However, let's say that we're responding to messages and respond to 10 of them. We now have 10 channels that have unread messages loaded. So we want load the next 10. So we call channelService.loadMoreChannels() with an offset of 20... but... there are only 20 unread messages. So if we have 20 messages in our channelSubject, when we query the channels again, no channels will be returned since there are none that match the offset.
This can also happen, too, if channels populate via the web socket. Because the client this.channels.length is always used as the offset, it opens up the possibility that the next time the pagination occurs, it will skip or miss channels completely.
- Lingua principale
- TypeScript
- Stelle
- 67
- Fork
- 34
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GetStream/stream-chat-angular
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
GetStream/stream-chat-angular#711 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
GetStream/stream-chat-angular#663 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
GetStream/stream-chat-angular#656 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
GetStream/stream-chat-angular#655 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
GetStream/stream-chat-angular#630 · 1 commento ·
Tutte le issue di GetStream/stream-chat-angular
Issue simili
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Mend: dependency security vulnerability untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100