As investigated in #9731, when raft.segment_max_entries is set to a value >= 2^16 (65,536), the segment file header field will overflow and consumers will run into an exception such as ra_log_segment_unexpected_eof or gap_between_snapshot_and_first_index ({corrupt_log,gap_between_snapshot_and_first_index,{-1,779977}}), depending on Ra version.
raft.segment_max_entries needs a config schema validator.