EnableAtRestRecordEncryption defaults to true in 2.2.0 (false in 2.0.0.x): ~40% point-read regression, undocumented
Les mainteneurs répondent en général sous 2 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 76/100
- Type d'issue
- Documentation
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- csharp
- Domaine
- databases, documentation, performance
Piste de recherche
Commencez par la documentation de l’API DatabaseConfig.EnableAtRestRecordEncryption et les notes de version ou le changelog de la 2.2.0. Confirmez que la modification de la valeur par défaut était intentionnelle, puis documentez son impact sur les performances de lecture, son interaction avec EnableBatchEncryption et les options disponibles basées sur la charge de travail. Le travail est terminé lorsque le changement de comportement est découvrable et que les consommateurs peuvent comprendre le compromis entre sécurité et performances sans modifier la valeur par défaut.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- C#
- Étoiles
- 42
- Forks
- 6
- Merge moyen
- 4 j 12 h
- PR mergées (30 j)
- 24
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de MPCoreDeveloper/SharpCoreDB
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 78/100
MPCoreDeveloper/SharpCoreDB#532 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
Future idea with more examples/samples/toolPeut-être à nouveau libre @MPCoreDeveloper l’a pris il y a 230 jours, et aucune pull request n’est ouverte. Ouvertearea:docs area:security area:viewer documentation enhancement good first issue
MPCoreDeveloper/SharpCoreDB#171 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de MPCoreDeveloper/SharpCoreDB
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
martin-stromberg/FinanceManager#628 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Left Hand Margin Too NarrowOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
builtbybel/FluentCleaner#266 ·
Les mainteneurs répondent en général sous 2 jours
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 2 jours