mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-06 22:41:56 +02:00
fix loading generational ec volumes
This commit is contained in:
1 parent
66c688c656
commit
722aebdf11
1 file changed
+5
@@ -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:]
|
||||
|
||||
Reference in new issue
Block a user