EnableAtRestRecordEncryption defaults to true in 2.2.0 (false in 2.0.0.x): ~40% point-read regression, undocumented
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- csharp
- Área
- databases, documentation, performance
Línea de trabajo
Comienza con la documentación de la API DatabaseConfig.EnableAtRestRecordEncryption y las notas de la versión o el changelog de 2.2.0. Confirma si el cambio del valor predeterminado fue intencional y documenta su impacto en el rendimiento de lectura, su interacción con EnableBatchEncryption y las opciones disponibles basadas en la carga de trabajo. El trabajo estará terminado cuando el cambio de comportamiento sea detectable y los consumidores puedan comprender el equilibrio entre seguridad y rendimiento sin cambiar el valor predeterminado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C#
- Estrellas
- 42
- Forks
- 6
- Merge medio
- 4 d 12 h
- PR fusionados (30 d)
- 24
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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 MPCoreDeveloper/SharpCoreDB
-
Dificultad 3/5 Medio día Aptitud para principiantes 78/100
MPCoreDeveloper/SharpCoreDB#532 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Future idea with more examples/samples/toolQuizá libre de nuevo @MPCoreDeveloper la tomó hace 230 días y no hay ningún pull request abierto. Abiertoarea:docs area:security area:viewer documentation enhancement good first issue
MPCoreDeveloper/SharpCoreDB#171 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 2 días
Todos los issues de MPCoreDeveloper/SharpCoreDB
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
martin-stromberg/FinanceManager#628 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Left Hand Margin Too NarrowAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
builtbybel/FluentCleaner#266 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
Los mantenedores suelen responder en 2 días