mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 17:32:56 +00:00
Fix image layer format version matching
This commit is contained in:
@@ -396,7 +396,12 @@ impl ImageLayerInner {
|
||||
let actual_summary =
|
||||
Summary::des_prefix(summary_blk.as_ref()).context("deserialize first block")?;
|
||||
|
||||
if actual_summary.format_version > STORAGE_FORMAT_VERSION {
|
||||
bail!("Forward compatibility of storage is not supported: current format version is {}, format version of layer {} is {}", STORAGE_FORMAT_VERSION, path, actual_summary.format_version);
|
||||
}
|
||||
if let Some(mut expected_summary) = summary {
|
||||
// assume backward compatibility
|
||||
expected_summary.format_version = actual_summary.format_version;
|
||||
// production code path
|
||||
expected_summary.index_start_blk = actual_summary.index_start_blk;
|
||||
expected_summary.index_root_blk = actual_summary.index_root_blk;
|
||||
|
||||
Reference in New Issue
Block a user