Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
a7b8c71a
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a7b8c71a
编写于
11月 19, 2019
作者:
H
hzcheng
提交者:
GitHub
11月 19, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #743 from taosdata/hotfix/#742
fix #742
上级
1f246598
1f953a0f
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
16 addition
and
2 deletion
+16
-2
src/system/detail/src/vnodeCache.c
src/system/detail/src/vnodeCache.c
+1
-0
src/system/detail/src/vnodeImport.c
src/system/detail/src/vnodeImport.c
+15
-2
未找到文件。
src/system/detail/src/vnodeCache.c
浏览文件 @
a7b8c71a
...
@@ -172,6 +172,7 @@ int vnodeFreeCacheBlock(SCacheBlock *pCacheBlock) {
...
@@ -172,6 +172,7 @@ int vnodeFreeCacheBlock(SCacheBlock *pCacheBlock) {
SCachePool
*
pPool
=
(
SCachePool
*
)
vnodeList
[
pObj
->
vnode
].
pCachePool
;
SCachePool
*
pPool
=
(
SCachePool
*
)
vnodeList
[
pObj
->
vnode
].
pCachePool
;
if
(
pCacheBlock
->
notFree
)
{
if
(
pCacheBlock
->
notFree
)
{
pPool
->
notFreeSlots
--
;
pPool
->
notFreeSlots
--
;
pInfo
->
unCommittedBlocks
--
;
dTrace
(
"vid:%d sid:%d id:%s, cache block is not free, slot:%d, index:%d notFreeSlots:%d"
,
dTrace
(
"vid:%d sid:%d id:%s, cache block is not free, slot:%d, index:%d notFreeSlots:%d"
,
pObj
->
vnode
,
pObj
->
sid
,
pObj
->
meterId
,
pCacheBlock
->
slot
,
pCacheBlock
->
index
,
pPool
->
notFreeSlots
);
pObj
->
vnode
,
pObj
->
sid
,
pObj
->
meterId
,
pCacheBlock
->
slot
,
pCacheBlock
->
index
,
pPool
->
notFreeSlots
);
}
}
...
...
src/system/detail/src/vnodeImport.c
浏览文件 @
a7b8c71a
...
@@ -479,7 +479,7 @@ int vnodeImportToFile(SImportInfo *pImport) {
...
@@ -479,7 +479,7 @@ int vnodeImportToFile(SImportInfo *pImport) {
slot
=
(
slot
+
1
+
pInfo
->
maxBlocks
)
%
pInfo
->
maxBlocks
;
slot
=
(
slot
+
1
+
pInfo
->
maxBlocks
)
%
pInfo
->
maxBlocks
;
}
}
// last slot, the uncommitted slots shall be shifted
// last slot, the uncommitted slots shall be shifted
, a cache block may have empty rows
SCacheBlock
*
pCacheBlock
=
pInfo
->
cacheBlocks
[
slot
];
SCacheBlock
*
pCacheBlock
=
pInfo
->
cacheBlocks
[
slot
];
int
points
=
pCacheBlock
->
numOfPoints
-
pInfo
->
commitPoint
;
int
points
=
pCacheBlock
->
numOfPoints
-
pInfo
->
commitPoint
;
if
(
points
>
0
)
{
if
(
points
>
0
)
{
...
@@ -568,7 +568,7 @@ int vnodeImportToCache(SImportInfo *pImport, char *payload, int rows) {
...
@@ -568,7 +568,7 @@ int vnodeImportToCache(SImportInfo *pImport, char *payload, int rows) {
}
}
}
}
// copy the overwritten data into buffer
// copy the overwritten data into buffer
, merge cache blocks
tpoints
=
rows
;
tpoints
=
rows
;
pos
=
pImport
->
pos
;
pos
=
pImport
->
pos
;
slot
=
pImport
->
slot
;
slot
=
pImport
->
slot
;
...
@@ -603,6 +603,19 @@ int vnodeImportToCache(SImportInfo *pImport, char *payload, int rows) {
...
@@ -603,6 +603,19 @@ int vnodeImportToCache(SImportInfo *pImport, char *payload, int rows) {
pos
=
0
;
pos
=
0
;
tpoints
-=
points
;
tpoints
-=
points
;
if
(
tpoints
==
0
)
{
// free the rest of cache blocks, since cache blocks are merged
int
currentSlot
=
slot
;
while
(
slot
!=
pInfo
->
currentSlot
)
{
slot
=
(
slot
+
1
)
%
pInfo
->
maxBlocks
;
pCacheBlock
=
pInfo
->
cacheBlocks
[
slot
];
vnodeFreeCacheBlock
(
pCacheBlock
);
}
pInfo
->
currentSlot
=
currentSlot
;
slot
=
currentSlot
;
// make sure to exit from the while loop
}
if
(
slot
==
pInfo
->
currentSlot
)
break
;
if
(
slot
==
pInfo
->
currentSlot
)
break
;
slot
=
(
slot
+
1
)
%
pInfo
->
maxBlocks
;
slot
=
(
slot
+
1
)
%
pInfo
->
maxBlocks
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录