Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
41ec1ad5
O
oceanbase
项目概览
oceanbase
/
oceanbase
大约 1 年 前同步成功
通知
261
Star
6084
Fork
1301
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
41ec1ad5
编写于
10月 28, 2022
作者:
O
obdev
提交者:
wangzelin.wzl
10月 28, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compressor mem problem
上级
072bf595
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
46 addition
and
1 deletion
+46
-1
deps/oblib/src/lib/compress/ob_compressor.h
deps/oblib/src/lib/compress/ob_compressor.h
+1
-0
deps/oblib/src/lib/compress/zstd/ob_zstd_compressor.cpp
deps/oblib/src/lib/compress/zstd/ob_zstd_compressor.cpp
+13
-0
deps/oblib/src/lib/compress/zstd/ob_zstd_compressor.h
deps/oblib/src/lib/compress/zstd/ob_zstd_compressor.h
+2
-0
deps/oblib/src/lib/compress/zstd_1_3_8/ob_zstd_compressor_1_3_8.cpp
.../src/lib/compress/zstd_1_3_8/ob_zstd_compressor_1_3_8.cpp
+13
-0
deps/oblib/src/lib/compress/zstd_1_3_8/ob_zstd_compressor_1_3_8.h
...ib/src/lib/compress/zstd_1_3_8/ob_zstd_compressor_1_3_8.h
+2
-0
src/share/stat/ob_opt_stat_sql_service.cpp
src/share/stat/ob_opt_stat_sql_service.cpp
+5
-0
src/storage/blocksstable/ob_macro_block.cpp
src/storage/blocksstable/ob_macro_block.cpp
+7
-1
src/storage/blocksstable/ob_macro_block_reader.cpp
src/storage/blocksstable/ob_macro_block_reader.cpp
+3
-0
未找到文件。
deps/oblib/src/lib/compress/ob_compressor.h
浏览文件 @
41ec1ad5
...
...
@@ -40,6 +40,7 @@ public:
int64_t
&
dst_data_size
)
=
0
;
virtual
int
get_max_overflow_size
(
const
int64_t
src_data_size
,
int64_t
&
max_overflow_size
)
const
=
0
;
virtual
void
reset_mem
()
{}
virtual
const
char
*
get_compressor_name
()
const
=
0
;
virtual
ObCompressorType
get_compressor_type
()
const
=
0
;
...
...
deps/oblib/src/lib/compress/zstd/ob_zstd_compressor.cpp
浏览文件 @
41ec1ad5
...
...
@@ -65,6 +65,11 @@ void ObZstdCtxAllocator::reuse()
allocator_
.
reuse
();
}
void
ObZstdCtxAllocator
::
reset
()
{
allocator_
.
reset
();
}
/**
* ----------------------------ObZstdCompressor---------------------------
*/
...
...
@@ -147,6 +152,14 @@ int ObZstdCompressor::decompress(const char *src_buffer,
return
ret
;
}
void
ObZstdCompressor
::
reset_mem
()
{
ObZstdCtxAllocator
*
zstd_allocator
=
GET_TSI_MULT
(
ObZstdCtxAllocator
,
1
);
if
(
NULL
!=
zstd_allocator
)
{
zstd_allocator
->
reset
();
}
}
const
char
*
ObZstdCompressor
::
get_compressor_name
()
const
{
return
all_compressor_name
[
ObCompressorType
::
ZSTD_COMPRESSOR
];
...
...
deps/oblib/src/lib/compress/zstd/ob_zstd_compressor.h
浏览文件 @
41ec1ad5
...
...
@@ -31,6 +31,7 @@ public:
void
*
alloc
(
size_t
size
);
void
free
(
void
*
addr
);
void
reuse
();
void
reset
();
private:
ObArenaAllocator
allocator_
;
};
...
...
@@ -54,6 +55,7 @@ public:
ObCompressorType
get_compressor_type
()
const
;
int
get_max_overflow_size
(
const
int64_t
src_data_size
,
int64_t
&
max_overflow_size
)
const
;
void
reset_mem
();
};
}
// namespace zstd
...
...
deps/oblib/src/lib/compress/zstd_1_3_8/ob_zstd_compressor_1_3_8.cpp
浏览文件 @
41ec1ad5
...
...
@@ -66,6 +66,11 @@ void ObZstdCtxAllocator::reuse()
allocator_
.
reuse
();
}
void
ObZstdCtxAllocator
::
reset
()
{
allocator_
.
reset
();
}
/**
* ----------------------------ObZstdCompressor---------------------------
*/
...
...
@@ -148,6 +153,14 @@ int ObZstdCompressor_1_3_8::decompress(const char *src_buffer,
return
ret
;
}
void
ObZstdCompressor_1_3_8
::
reset_mem
()
{
ObZstdCtxAllocator
*
zstd_allocator
=
GET_TSI_MULT
(
ObZstdCtxAllocator
,
1
);
if
(
NULL
!=
zstd_allocator
)
{
zstd_allocator
->
reset
();
}
}
const
char
*
ObZstdCompressor_1_3_8
::
get_compressor_name
()
const
{
return
all_compressor_name
[
ObCompressorType
::
ZSTD_1_3_8_COMPRESSOR
];
...
...
deps/oblib/src/lib/compress/zstd_1_3_8/ob_zstd_compressor_1_3_8.h
浏览文件 @
41ec1ad5
...
...
@@ -31,6 +31,7 @@ public:
void
*
alloc
(
size_t
size
);
void
free
(
void
*
addr
);
void
reuse
();
void
reset
();
private:
ObArenaAllocator
allocator_
;
};
...
...
@@ -54,6 +55,7 @@ public:
ObCompressorType
get_compressor_type
()
const
;
int
get_max_overflow_size
(
const
int64_t
src_data_size
,
int64_t
&
max_overflow_size
)
const
;
void
reset_mem
();
};
}
// namespace zstd_1_3_8
...
...
src/share/stat/ob_opt_stat_sql_service.cpp
浏览文件 @
41ec1ad5
...
...
@@ -1486,6 +1486,9 @@ int ObOptStatSqlService::get_compressed_llc_bitmap(ObIAllocator &allocator,
comp_buf
=
const_cast
<
char
*>
(
bitmap_buf
);
comp_size
=
bitmap_size
;
}
if
(
compressor
!=
nullptr
)
{
compressor
->
reset_mem
();
}
}
return
ret
;
}
...
...
@@ -1523,6 +1526,8 @@ int ObOptStatSqlService::get_decompressed_llc_bitmap(ObIAllocator &allocator,
LOG_WARN
(
"decompress bitmap buffer failed."
,
KP
(
comp_buf
),
K
(
comp_size
),
KP
(
bitmap_buf
),
K
(
max_bitmap_size
),
K
(
bitmap_size
),
K
(
ret
));
}
else
{
compressor
->
reset_mem
();
}
return
ret
;
}
...
...
src/storage/blocksstable/ob_macro_block.cpp
浏览文件 @
41ec1ad5
...
...
@@ -374,13 +374,19 @@ ObMicroBlockCompressor::ObMicroBlockCompressor()
ObMicroBlockCompressor
::~
ObMicroBlockCompressor
()
{
if
(
compressor_
!=
nullptr
)
{
compressor_
->
reset_mem
();
}
}
void
ObMicroBlockCompressor
::
reset
()
{
is_none_
=
false
;
micro_block_size_
=
0
;
compressor_
=
NULL
;
if
(
compressor_
!=
nullptr
)
{
compressor_
->
reset_mem
();
compressor_
=
nullptr
;
}
comp_buf_
.
reuse
();
decomp_buf_
.
reuse
();
}
...
...
src/storage/blocksstable/ob_macro_block_reader.cpp
浏览文件 @
41ec1ad5
...
...
@@ -49,6 +49,9 @@ ObMacroBlockReader::~ObMacroBlockReader()
encryption_
->~
ObMicroBlockEncryption
();
encryption_
=
nullptr
;
}
if
(
nullptr
!=
compressor_
)
{
compressor_
->
reset_mem
();
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录