EnableAtRestRecordEncryption defaults to true in 2.2.0 (false in 2.0.0.x): ~40% point-read regression, undocumented
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- csharp
- Lĩnh vực
- databases, documentation, performance
Hướng nghiên cứu
Bắt đầu với tài liệu API DatabaseConfig.EnableAtRestRecordEncryption và ghi chú phát hành hoặc changelog của phiên bản 2.2.0. Xác nhận rằng thay đổi giá trị mặc định là có chủ đích, sau đó ghi lại chi phí về hiệu năng đọc, mối tương tác với EnableBatchEncryption và các tùy chọn dựa trên tải công việc hiện có. Công việc hoàn tất khi thay đổi hành vi có thể được tìm thấy và người tiêu dùng có thể hiểu sự đánh đổi giữa bảo mật và hiệu năng mà không cần thay đổi giá trị mặc định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
In 2.2.0 DatabaseConfig.EnableAtRestRecordEncryption defaults to true; in 2.0.0.3 it defaults to false. Because every point read decrypts the record envelope, this costs about 40% of read throughput (1.66x on the same store). The flip is not called out in the 2.2.0 release notes/changelog we could find, and the property docs do not quantify the cost — so consumers upgrading from 2.0.0.x see a read regression with no obvious cause.
How it was found
ServiceMq's SharpCoreDB provider moved from SharpCoreDB 2.0.0.3 (net10.0) to 2.2.0 (net11.0). Point reads dropped from 132,592 to 101,616 ops/sec (−23%) while every other operation improved. Enumerating new DatabaseConfig() by reflection in both packages:
2.0.0.3: EnableAtRestRecordEncryption = False
2.2.0 : EnableAtRestRecordEncryption = True
Other defaults also changed in 2.2.0 (FixedWidthInlineValueBytes 0 → 24, EnableDeferredDeleteIndexes false → true, new EnableBufferedAppends false, AppendBufferFlush*), but only this one produced a measurable read regression.
Isolated on the same store (5,000 rows, median of 3, net11.0, NTFS; the provider seals payloads itself with AES-256-GCM):
EnableAtRestRecordEncryption |
point reads | durable writes |
|---|---|---|
true (2.2.0 default) |
84,296 ops/sec | 2,189 ops/sec |
false |
139,825 ops/sec | 2,252 ops/sec |
So ~1.66x read throughput; writes effectively unchanged when the caller already encrypts payloads.
It is a real protection, not free to drop
Scanning the store files for a distinctive queue key and payload:
EnableAtRestRecordEncryption = true: neither the key nor the payload appears in plaintext in the data files;false: the payload stays sealed (the provider encrypts it), but the record key, area and timestamps are plaintext in the data file.
So the secure default is defensible as a posture; this issue is mainly about documentation and expectations, not necessarily about flipping it back.
Questions / asks
- Confirm the flip is intentional on the 2.2.0 line and add it to the release notes/changelog as a behaviour and performance change (~40% of point reads).
- Document the interaction with
EnableBatchEncryption: when batch encryption already encrypts the table file (ServiceMq forces it on), what does per-record at-rest encryption add, and what does it cost? If it is a second layer inside an already-encrypted file, one sentence in the docs ("envelope protection, costs ~40% of reads") would let consumers decide. - Consider whether
StorageEngineType/WorkloadHintshould influence the default (read-heavy → off), or at least surface the trade-off in theDatabaseConfigdocs.
Reproduction is a two-line config comparison plus a read loop over an existing store; happy to share the harness and raw output.
- Ngôn ngữ chính
- C#
- Star
- 42
- Fork
- 6
- Merge trung bình
- 4 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 24
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc 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 MPCoreDeveloper/SharpCoreDB
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 78/100
MPCoreDeveloper/SharpCoreDB#532 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Future idea with more examples/samples/toolCó thể làm lại được @MPCoreDeveloper đã nhận 230 ngày trước và không có pull request nào đang mở. Đang mởarea:docs area:security area:viewer documentation enhancement good first issue
MPCoreDeveloper/SharpCoreDB#171 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của MPCoreDeveloper/SharpCoreDB
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Left Hand Margin Too NarrowĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
builtbybel/FluentCleaner#266 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100