xanderbailey commented on code in PR #3700:
URL: https://github.com/apache/iceberg-rust/pull/3700#discussion_r4693997349
##########
crates/iceberg/src/encryption/stream.rs:
##########
@@ -144,14 +145,15 @@ pub struct AesGcmFileRead {
num_blocks: u64,
/// Size of the last cipher block (may be smaller than
`CIPHER_BLOCK_SIZE`).
last_cipher_block_size: u32,
+ /// Whether a read has checked the AGS1 header, which no block
authenticates.
+ header_checked: AtomicBool,
Review Comment:
The AtomicBool itself costs nothing measurable. Claude's bench:
| Case | c52cf46 | AtomicBool |
|---|---|---|
| Cold, past block 0, 0 ms latency, 1 read | 3.9 ms | 3.9 ms |
| Cold, past block 0, 0 ms latency, 32 concurrent | 124.9 ms (32 requests) |
125.4 ms (33 requests) |
| Cold, past block 0, 5 ms latency, 1 read | 11.5 ms | 19.0 ms (2 requests) |
| Cold, past block 0, 5 ms latency, 32 concurrent | 132.6 ms (32 requests) |
140.2 ms (64 requests) |
| Cold, block 0, 5 ms latency, 32 concurrent | 131.8 ms | 133.4 ms |
| Cold, whole file, 5 ms latency | 38.9 ms | 38.6 ms |
| Warm, past block 0, 32 tasks × 20 reads | 316.1 ms | 315.9 ms |
| Warm, block 0, 32 tasks × 20 reads | 316.0 ms | 316.2 ms |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]