BufferInitial gets into loop if timeout is less than 1 ms
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 57/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- C#
- Star
- 1.9k
- Fork
- 194
- Merge trung bình
- 12 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của reactivemarbles/DynamicData
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
reactivemarbles/DynamicData#1229 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
infrastructure
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
reactivemarbles/DynamicData#1089 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: ChangeAwareList merges an insert one slot before a pending AddRange, corrupting list order downstreamCó thể đã có người làm @dwcullop đã nhận 9 ngày trước. Đang mởbug
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 63/100
reactivemarbles/DynamicData#1225 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: Make Avg, StdDev, Maximum and Minimum refresh-aware, consistent with SumCó thể đã có người làm @dwcullop đã nhận 14 ngày trước. Đang mởbreaking change enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
reactivemarbles/DynamicData#1214 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
reactivemarbles/DynamicData#1196 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của reactivemarbles/DynamicData
Issue tương tự
-
Feature needs response
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Adyen/adyen-dotnet-api-library#1907 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
immichFrame/ImmichFrame#735 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
dimitar-radenkov/Pointframe#318 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
DotHarness/dotcraft#546 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
a-corriger bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
christian-raj/S-Aloha#303 · 1 bình luận ·