mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
[skip ci] Fix grammar mistake in local_chunk_manager (#13418)
Signed-off-by: yun.zhang <yun.zhang@zilliz.com> Co-authored-by: yun.zhang <yun.zhang@zilliz.com>
This commit is contained in:
parent
0aa8e65501
commit
dec2eba610
@ -34,7 +34,7 @@ func NewLocalChunkManager(localPath string) *LocalChunkManager {
|
||||
}
|
||||
}
|
||||
|
||||
// GetPath returns the path of local data if exist.
|
||||
// GetPath returns the path of local data if exists.
|
||||
func (lcm *LocalChunkManager) GetPath(key string) (string, error) {
|
||||
if !lcm.Exist(key) {
|
||||
return "", errors.New("local file cannot be found with key:" + key)
|
||||
@ -70,7 +70,7 @@ func (lcm *LocalChunkManager) Exist(key string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Read reads the local storage data if exist.
|
||||
// Read reads the local storage data if exists.
|
||||
func (lcm *LocalChunkManager) Read(key string) ([]byte, error) {
|
||||
filePath := path.Join(lcm.localPath, key)
|
||||
file, err := os.Open(path.Clean(filePath))
|
||||
@ -84,7 +84,7 @@ func (lcm *LocalChunkManager) Read(key string) ([]byte, error) {
|
||||
return content, file.Close()
|
||||
}
|
||||
|
||||
// ReadAt reads specific position data of local storage if exist.
|
||||
// ReadAt reads specific position data of local storage if exists.
|
||||
func (lcm *LocalChunkManager) ReadAt(key string, p []byte, off int64) (n int, err error) {
|
||||
path := path.Join(lcm.localPath, key)
|
||||
at, err := mmap.Open(path)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user