milvus/internal/storage/binlog_util.go
Xiaofan 6d82ef8c20
fix garbage collector err handling (#18277)
Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>
2022-07-15 13:54:26 +08:00

13 lines
295 B
Go

package storage
import (
"strconv"
"strings"
)
func ParseSegmentIDByBinlog(path string) (UniqueID, error) {
// binlog path should consist of "files/insertLog/collID/partID/segID/fieldID/fileName"
keyStr := strings.Split(path, "/")
return strconv.ParseInt(keyStr[len(keyStr)-3], 10, 64)
}