Yan-Daojiang has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24387


Change subject: KUDU-3779: support in-memory metadata replay for encrypted 
clusters
......................................................................

KUDU-3779: support in-memory metadata replay for encrypted clusters

KUDU-3778 (Change-Id: Iacbe12977ae945e) sped up tserver startup by
reading each LBM native-meta container's .metadata file fully into
memory before replay, but disabled the optimization on encrypted
clusters: the in-memory shim bypassed the env's per-Read decryption,
and a bulk decrypt at preload time would have broken the per-slice
IsAllZeros() short-circuit that KUDU-2260 trailing-zero recovery
depends on.

This change extends the optimization to encrypted clusters by caching
the ciphertext in memory and decrypting on each in-memory Read().
RandomAccessFile gains two virtuals with no-op defaults
(ReadRaw / Decrypt) so the non-encrypted path is unchanged;
PosixRandomAccessFile overrides them to expose its existing
DoReadV / DoDecryptV helpers, which keep the IsAllZeros() short-circuit
intact. MaybePreloadMetadataIntoMemory() no longer gates on encryption
and applies the existing replay-threshold flag to the payload size.

Non-encrypted behavior is bit-for-bit unchanged. Encrypted clusters
now get the same syscall collapse (O(records) -> O(containers)) and
still recover trailing zero pads correctly.

Change-Id: I37af5bc37613dd4081e1ad708f084e1c88fb3e75
---
M src/kudu/fs/log_block_manager-test.cc
M src/kudu/fs/log_block_manager.cc
M src/kudu/fs/log_block_manager.h
M src/kudu/util/env-test.cc
M src/kudu/util/env.h
M src/kudu/util/env_posix.cc
M src/kudu/util/file_cache.cc
7 files changed, 446 insertions(+), 67 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/87/24387/1
--
To view, visit http://gerrit.cloudera.org:8080/24387
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I37af5bc37613dd4081e1ad708f084e1c88fb3e75
Gerrit-Change-Number: 24387
Gerrit-PatchSet: 1
Gerrit-Owner: Yan-Daojiang <[email protected]>

Reply via email to