mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 04:49:08 +08:00
13 lines
295 B
Go
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)
|
||
|
}
|