TAR archive has only 20kb when application high load
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu với bản tái hiện TarArchiveWriter được cung cấp, đặc biệt là Write, GetResult và Dispose, rồi tái hiện việc tạo archive trong workload MVC .NET Framework 4.8 tải cao như mô tả. Kiểm tra xem các gói TAR tạo ra có chứa toàn bộ nội dung đã ghi hay không và xác định nguyên nhân khiến đầu ra có kích thước khoảng 20 KB; issue không nêu tên tệp dự án hoặc test nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
I have .net framework 4.8 application. I'm building TAR archive from multiple memory streams, everything goes ok when application has low load. After executing performance tests, TAR building crashes. Every package after high load has only 20kb.
Reproduction Code
public class TarArchiveWriter : IArchiveWriter
{
private readonly MemoryStream _memoryStream;
private readonly TarOutputStream _tarOutputStream;
private readonly List<IDisposable> _toDispose = new List<IDisposable>();
public string Extension => "tar";
public TarArchiveWriter()
{
_memoryStream = new MemoryStream();
_tarOutputStream = new TarOutputStream(_memoryStream, Encoding.UTF8);
}
public void Write(string path, string xml)
{
var bytes = Encoding.UTF8.GetBytes(xml);
Write(path, bytes);
}
public void Write(string path, byte[] content)
{
var entry = TarEntry.CreateTarEntry(path);
entry.Size = content.Length;
_tarOutputStream.PutNextEntry(entry);
var binaryWriter = new BinaryWriter(_tarOutputStream);
_toDispose.Add(binaryWriter);
binaryWriter.Write(content);
binaryWriter.Flush();
_tarOutputStream.CloseEntry();
}
public void Write(string path)
{
var entry = TarEntry.CreateTarEntry(path);
_tarOutputStream.PutNextEntry(entry);
}
public byte[] GetResult()
{
_tarOutputStream.Close();
return _memoryStream?.ToArray();
}
public void Dispose()
{
foreach (var disposable in _toDispose)
{
disposable?.Dispose();
}
_tarOutputStream?.Dispose();
_memoryStream?.Dispose();
_toDispose.Clear();
}
}
Steps to reproduce
- Create .net MVC application on framework 4.8
- Run high load, performance tests
- Try to build TAR Archive from memory streams
- Every package has 20kb
Expected behavior
Package should be build properly
Operating System
Windows
Framework Version
.NET Framework 4.x
Tags
Tar
Additional context
No response
- Ngôn ngữ chính
- C#
- Star
- 3.9k
- Fork
- 1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
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 icsharpcode/SharpZipLib
-
*no response* bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
icsharpcode/SharpZipLib#905 · 1 bình luận ·
-
bug bzip2
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
icsharpcode/SharpZipLib#904 ·
-
SetLevel in ZipFile Đang mởenhancement zip
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 55/100
icsharpcode/SharpZipLib#903 ·
-
*no response* bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
icsharpcode/SharpZipLib#901 · 1 bình luận ·
-
*no response* bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
icsharpcode/SharpZipLib#894 · 1 bình luận ·
Tất cả issue của icsharpcode/SharpZipLib
Issue tương tự
-
core dependencies
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
-
bug frontend good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
unoplatform/uno#24629 ·
-
agentic-workflows Needs: Triage :mag: State: In-PR
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Down / Waiting for removal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100