feat: implement background DEK re-encryption pipeline#898
Merged
Conversation
|
🦢 Load Test Results Goose Attack ReportPlan Overview
Request Metrics
Response Time Metrics
Status Code Metrics
Transaction Metrics
Scenario Metrics
|
|
| Branch | claude/storage-security-raft-review-e0n6vi |
| Testbed | ubuntu-latest |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result nanoseconds (ns) (Result Δ%) | Upper Boundary nanoseconds (ns) (Limit %) |
|---|---|---|---|
| Command_Serde/apply/remove | 📈 view plot 🚷 view threshold | 118,310.00 ns(-58.16%)Baseline: 282,750.36 ns | 1,686,273.19 ns (7.02%) |
| Command_Serde/apply/set | 📈 view plot 🚷 view threshold | 134,440.00 ns(-42.40%)Baseline: 233,398.47 ns | 983,564.80 ns (13.67%) |
| Command_Serde/pack/delete | 📈 view plot 🚷 view threshold | 123.33 ns(+2.55%)Baseline: 120.27 ns | 141.84 ns (86.95%) |
| Command_Serde/pack/delete_index | 📈 view plot 🚷 view threshold | 111.53 ns(+1.67%)Baseline: 109.70 ns | 129.32 ns (86.24%) |
| Command_Serde/pack/set | 📈 view plot 🚷 view threshold | 211.77 ns(+9.83%)Baseline: 192.82 ns | 230.80 ns (91.75%) |
| Command_Serde/pack/set_index | 📈 view plot 🚷 view threshold | 111.71 ns(+2.01%)Baseline: 109.51 ns | 128.70 ns (86.80%) |
| Command_Serde/unpack/delete | 📈 view plot 🚷 view threshold | 205.55 ns(+6.57%)Baseline: 192.87 ns | 233.96 ns (87.86%) |
| Command_Serde/unpack/delete_index | 📈 view plot 🚷 view threshold | 158.88 ns(-1.03%)Baseline: 160.54 ns | 195.75 ns (81.16%) |
| Command_Serde/unpack/set | 📈 view plot 🚷 view threshold | 288.01 ns(+10.30%)Baseline: 261.10 ns | 322.80 ns (89.22%) |
| Command_Serde/unpack/set_index | 📈 view plot 🚷 view threshold | 156.42 ns(-1.85%)Baseline: 159.37 ns | 193.88 ns (80.68%) |
| Payload_encryption/pack/remove_cmd | 📈 view plot 🚷 view threshold | 125.79 ns(+8.02%)Baseline: 116.45 ns | 138.79 ns (90.63%) |
| Payload_encryption/pack/set_cmd | 📈 view plot 🚷 view threshold | 218.89 ns(+6.63%)Baseline: 205.28 ns | 271.75 ns (80.55%) |
| Payload_encryption/unpack/remove_cmd | 📈 view plot 🚷 view threshold | 215.04 ns(+5.00%)Baseline: 204.80 ns | 247.03 ns (87.05%) |
| Payload_encryption/unpack/set_cmd | 📈 view plot 🚷 view threshold | 303.27 ns(+10.83%)Baseline: 273.63 ns | 338.80 ns (89.51%) |
| Raft_1Node_Latency/prefix/1node | 📈 view plot 🚷 view threshold | 2,513,600.00 ns(-10.59%)Baseline: 2,811,277.66 ns | 5,725,442.99 ns (43.90%) |
| Raft_1Node_Latency/read/1node | 📈 view plot 🚷 view threshold | 42,920.00 ns(+442.55%)Baseline: 7,910.76 ns | 45,071.94 ns (95.23%) |
| Raft_1Node_Latency/remove/1node | 📈 view plot 🚷 view threshold | 349,420.00 ns(-36.05%)Baseline: 546,409.69 ns | 2,294,915.48 ns (15.23%) |
| Raft_1Node_Latency/write/1node | 📈 view plot 🚷 view threshold | 370,060.00 ns(-34.64%)Baseline: 566,146.09 ns | 2,127,959.36 ns (17.39%) |
| build_snapshot/default | 📈 view plot 🚷 view threshold | 114,010.00 ns(+8.54%)Baseline: 105,036.77 ns | 161,656.81 ns (70.53%) |
| fernet token/project | 📈 view plot 🚷 view threshold | 1,426.20 ns(+2.96%)Baseline: 1,385.20 ns | 1,623.34 ns (87.86%) |
| get_data_keyspace | 📈 view plot 🚷 view threshold | 0.31 ns(-1.20%)Baseline: 0.32 ns | 0.37 ns (84.48%) |
| get_db | 📈 view plot 🚷 view threshold | 0.31 ns(-1.06%)Baseline: 0.32 ns | 0.37 ns (84.71%) |
| get_fernet_token_timestamp/project | 📈 view plot 🚷 view threshold | 143.64 ns(-0.78%)Baseline: 144.77 ns | 180.36 ns (79.64%) |
| get_keyspace | 📈 view plot 🚷 view threshold | 4.36 ns(-7.50%)Baseline: 4.71 ns | 8.75 ns (49.80%) |
58f47a2 to
e7fbb2e
Compare
Replaces the log-only stub with a real background task: on each DEK rotation, sweep every not-yet-fully-migrated retired epoch and re-encrypt its remaining records under the current epoch, using an optimistic CAS retry (skip after 3 losses, retried on the next rotation cycle) since Fjall's plain Keyspace/Batch API has no built-in compare-and-swap (ADR 0016-v2 §6 step 5 / §6.2 step 4). Fully migrated epochs are marked done so they aren't rescanned by future rotations. Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
e7fbb2e to
9050ad7
Compare
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the log-only stub with a real background task: on each DEK
rotation, sweep every not-yet-fully-migrated retired epoch and
re-encrypt its remaining records under the current epoch, using an
optimistic CAS retry (skip after 3 losses, retried on the next
rotation cycle) since Fjall's plain Keyspace/Batch API has no
built-in compare-and-swap (ADR 0016-v2 §6 step 5 / §6.2 step 4).
Fully migrated epochs are marked done so they aren't rescanned by
future rotations.
Signed-off-by: Artem Goncharov artem.goncharov@gmail.com