Skip to content

perf: run the contiguous UPDATE/DELETE fast paths on plaintext default-config tables - #363

Merged
MPCoreDeveloper merged 1 commit into
masterfrom
perf/contiguous-plaintext-gate
Sep 3, 2026
Merged

perf: run the contiguous UPDATE/DELETE fast paths on plaintext default-config tables#363
MPCoreDeveloper merged 1 commit into
masterfrom
perf/contiguous-plaintext-gate

Conversation

@MPCoreDeveloper

Copy link
Copy Markdown
Owner

Summary

The contiguous single-pass UPDATE (#360) and DELETE (#361) fast paths previously required DatabaseConfig.NoEncryptMode, even though per-record encryption is opt-in (EnableAtRestRecordEncryption) — default-config databases already store plaintext records, so default users were silently missing the fast path.

The gate now checks the storage layer's runtime AreRecordsEncrypted (UseRecordEncryption && the file carries the encrypted-table magic header) instead of the config flag. Default-config (plaintext) tables get the single-pass path; genuinely per-record-encrypted tables still fall back to the generic loop.

Tests

  • Full suite 1654/1654.
  • DefaultPlaintextConfig_EngagesBulkPath_AndStaysCorrect — default config (no NoEncryptMode) now engages the fast path and stays correct.
  • PerRecordEncryption_FallsBackToGenericLoop_AndStaysCorrectEnableAtRestRecordEncryption = true (ciphertext records with magic header) still falls back and stays correct.

…t-config tables

The bulk fast paths previously required DatabaseConfig.NoEncryptMode, although per-record encryption is opt-in (EnableAtRestRecordEncryption): default-config databases already store plaintext records. Gate on the storage layer's runtime AreRecordsEncrypted (UseRecordEncryption && file carries the encrypted magic header) instead of the config flag, so default-config users get the single-pass UPDATE/DELETE path too; genuinely encrypted tables still fall back to the generic loop.
@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

@MPCoreDeveloper
MPCoreDeveloper merged commit a3038b3 into master Sep 3, 2026
13 checks passed
@MPCoreDeveloper
MPCoreDeveloper deleted the perf/contiguous-plaintext-gate branch September 3, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant