Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
f7605e41
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f7605e41
编写于
10月 12, 2019
作者:
W
wxyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MS-640 Cache object size calculate incorrect
Former-commit-id: 0d2350e1a5399d086f23a6d22a93bf84ff6d5b3e
上级
b6d86a10
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
3 deletion
+18
-3
cpp/CHANGELOG.md
cpp/CHANGELOG.md
+1
-0
cpp/src/wrapper/VecIndex.cpp
cpp/src/wrapper/VecIndex.cpp
+11
-2
cpp/src/wrapper/VecIndex.h
cpp/src/wrapper/VecIndex.h
+6
-1
未找到文件。
cpp/CHANGELOG.md
浏览文件 @
f7605e41
...
...
@@ -13,6 +13,7 @@ Please mark all change in change log and use the ticket from JIRA.
-
MS-601 - Docker logs error caused by get CPUTemperature error
-
MS-622 - Delete vectors should be failed if date range is invalid
-
MS-620 - Get table row counts display wrong error code
-
MS-640 - Cache object size calculate incorrect
## Improvement
-
MS-552 - Add and change the easylogging library
...
...
cpp/src/wrapper/VecIndex.cpp
浏览文件 @
f7605e41
...
...
@@ -37,9 +37,17 @@ namespace engine {
int64_t
VecIndex
::
Size
()
{
if
(
size_
!=
0
)
{
return
size_
;
}
return
Count
()
*
Dimension
()
*
sizeof
(
float
);
}
void
VecIndex
::
set_size
(
int64_t
size
)
{
size_
=
size
;
}
struct
FileIOReader
{
std
::
fstream
fs
;
std
::
string
name
;
...
...
@@ -157,9 +165,10 @@ GetVecIndexFactory(const IndexType& type, const Config& cfg) {
}
VecIndexPtr
LoadVecIndex
(
const
IndexType
&
index_type
,
const
knowhere
::
BinarySet
&
index_binary
)
{
LoadVecIndex
(
const
IndexType
&
index_type
,
const
knowhere
::
BinarySet
&
index_binary
,
int64_t
size
)
{
auto
index
=
GetVecIndexFactory
(
index_type
);
index
->
Load
(
index_binary
);
index
->
set_size
(
size
);
return
index
;
}
...
...
@@ -205,7 +214,7 @@ read_index(const std::string& location) {
delete
[]
meta
;
}
return
LoadVecIndex
(
current_type
,
load_data_list
);
return
LoadVecIndex
(
current_type
,
load_data_list
,
length
);
}
Status
...
...
cpp/src/wrapper/VecIndex.h
浏览文件 @
f7605e41
...
...
@@ -87,6 +87,9 @@ class VecIndex : public cache::DataObj {
int64_t
Size
()
override
;
void
set_size
(
int64_t
size
);
virtual
knowhere
::
BinarySet
Serialize
()
=
0
;
...
...
@@ -115,6 +118,8 @@ class VecIndex : public cache::DataObj {
return
Status
::
OK
();
}
////////////////
private:
int64_t
size_
=
0
;
};
extern
Status
...
...
@@ -127,7 +132,7 @@ extern VecIndexPtr
GetVecIndexFactory
(
const
IndexType
&
type
,
const
Config
&
cfg
=
Config
());
extern
VecIndexPtr
LoadVecIndex
(
const
IndexType
&
index_type
,
const
knowhere
::
BinarySet
&
index_binary
);
LoadVecIndex
(
const
IndexType
&
index_type
,
const
knowhere
::
BinarySet
&
index_binary
,
int64_t
size
);
extern
IndexType
ConvertToCpuIndexType
(
const
IndexType
&
type
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录