@Override
protected WALHdrContext readHeader(WALHeader.Builder builder, FSDataInputStream stream)
throws IOException {
WALHdrContext hdrCtxt = super.readHeader(builder, stream);
WALHdrResult result = hdrCtxt.getResult();
// We need to unconditionally handle the case where the WAL has a key in
// the header, meaning it is encrypted, even if ENABLE_WAL_ENCRYPTION is
// no longer set in the site configuration.
if (result == WALHdrResult.SUCCESS && builder.hasEncryptionKey()) {
// Serialized header data has been merged into the builder from the