Implementation can cause major inconsistencies and missed messages
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- angular, typescript
- Área
- frontend
Línea de trabajo
Comienza en channelService.init() y channelService.loadMoreChannels(), y luego sigue cómo channelSubject y this.channels.length determinan los offsets de paginación. Reproduce el caso has_unread mientras se leen mensajes o llegan canales a través de websocket; se considera terminado cuando las cargas posteriores no omiten ni pasan por alto canales coincidentes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 67
- Forks
- 34
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de GetStream/stream-chat-angular
-
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
GetStream/stream-chat-angular#711 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
GetStream/stream-chat-angular#663 · 2 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 20/100
GetStream/stream-chat-angular#656 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
GetStream/stream-chat-angular#655 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
GetStream/stream-chat-angular#630 · 1 comentario ·
Todos los issues de GetStream/stream-chat-angular
Issues similares
-
fix: txId branch of the contract-state streams drops every state after the named transactionAbiertobot:ai-assisted status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
midnightntwrk/midnight-js#1424 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
mksglu/context-mode#1268 ·
Los mantenedores suelen responder en 5 días
-
[bug] Setup fails with "Cannot find matching keyid" when an older Node's corepack is on PATHPosiblemente ocupada @EyalPoly la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
MystenLabs/MemWal#1124 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Edit:Abiertocheck:failed streams:edit
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100
iptv-org/iptv#54352 · 1 comentario ·
Los mantenedores suelen responder en 1 día