From 722aebdf111f3fa4fbeaa2237e41a2f93a7f066f Mon Sep 17 00:00:00 2001 From: chrislu Date: Wed, 13 Aug 2025 18:31:03 -0700 Subject: [PATCH] fix loading generational ec volumes --- weed/storage/disk_location.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index 401d65f15..c9db2327b 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -115,6 +115,11 @@ func volumeIdFromFileName(filename string) (needle.VolumeId, string, error) { } func parseCollectionVolumeId(base string) (collection string, vid needle.VolumeId, err error) { + // Remove generation suffix first (e.g., "1_g1" -> "1") + if gIndex := strings.LastIndex(base, "_g"); gIndex >= 0 { + base = base[:gIndex] + } + i := strings.LastIndex(base, "_") if i > 0 { collection, base = base[0:i], base[i+1:]