BufferInitial gets into loop if timeout is less than 1 ms
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 57/100
Línea de trabajo
The issue provides a reproduction test for BufferInitial using 999- and 1000-microsecond timeouts, but names no source or test file. Start by locating the BufferInitial implementation and running the supplied test in the project’s test suite. Done means the sub-millisecond case no longer spins or allocates excessively, or it throws ArgumentException if such timeouts are unsupported.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug 🐞
BufferInitial gets into loop if timeout is less than 1 ms.
Take a look at the test below.
It works ok if timeout is 1ms, but it starts spinning 1 CPU core to 100% and allocate piles of garbage if the timeout is 999us.
For the 999us case values of the variables:
allocatedBefore: 5842280
allocatedAfter: 142591816
Step to reproduce
[Theory]
[InlineData(999)]
[InlineData(1000)]
public async Task Test_BufferInitial(int microseconds)
{
using SourceCache<Item, int> cache = new(x => x.Id);
long allocatedBefore = GC.GetTotalAllocatedBytes();
using (cache.Connect().BufferInitial(TimeSpan.FromMicroseconds(microseconds)).Subscribe())
await Task.Delay(TimeSpan.FromSeconds(1), TestContext.Current.CancellationToken);
long allocatedAfter = GC.GetTotalAllocatedBytes();
Assert.True(allocatedAfter - allocatedBefore < 10 * 1024 * 1024);
}
Expected behavior
If the operator does not expect such small values, it should throw ArgumentException
- Lenguaje dominante
- C#
- Estrellas
- 1.9k
- Forks
- 194
- Merge medio
- 12 min
- PR fusionados (30 d)
- 1
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 reactivemarbles/DynamicData
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
reactivemarbles/DynamicData#1229 ·
Los mantenedores suelen responder en 1 día
-
infrastructure
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
reactivemarbles/DynamicData#1089 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug]: ChangeAwareList merges an insert one slot before a pending AddRange, corrupting list order downstreamPosiblemente ocupada @dwcullop la tomó hace 9 días. Abiertobug
Dificultad 3/5 Medio día Aptitud para principiantes 63/100
reactivemarbles/DynamicData#1225 ·
Los mantenedores suelen responder en 1 día
-
[Feature]: Make Avg, StdDev, Maximum and Minimum refresh-aware, consistent with SumPosiblemente ocupada @dwcullop la tomó hace 14 días. Abiertobreaking change enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
reactivemarbles/DynamicData#1214 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
reactivemarbles/DynamicData#1196 ·
Los mantenedores suelen responder en 1 día
Todos los issues de reactivemarbles/DynamicData
Issues similares
-
Feature needs response
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Adyen/adyen-dotnet-api-library#1907 ·
Los mantenedores suelen responder en 5 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
immichFrame/ImmichFrame#735 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dimitar-radenkov/Pointframe#318 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
DotHarness/dotcraft#546 ·
Los mantenedores suelen responder en 1 día
-
a-corriger bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
christian-raj/S-Aloha#303 · 1 comentario ·