Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
defcd29b
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
defcd29b
编写于
10月 19, 2020
作者:
A
Alexander Kuzmenkov
提交者:
GitHub
10月 19, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16036 from ClickHouse/stress_test_improvemets
Minor improvements of stress test
上级
0c1f8e60
eb483fc7
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
27 addition
and
7 deletion
+27
-7
docker/test/stress/run.sh
docker/test/stress/run.sh
+1
-1
docker/test/stress/stress
docker/test/stress/stress
+10
-0
src/Common/Exception.cpp
src/Common/Exception.cpp
+5
-4
src/Common/Exception.h
src/Common/Exception.h
+4
-0
src/Common/tests/gtest_rw_lock.cpp
src/Common/tests/gtest_rw_lock.cpp
+3
-0
src/Storages/StorageMergeTree.cpp
src/Storages/StorageMergeTree.cpp
+2
-1
src/Storages/StorageReplicatedMergeTree.cpp
src/Storages/StorageReplicatedMergeTree.cpp
+2
-1
未找到文件。
docker/test/stress/run.sh
浏览文件 @
defcd29b
...
...
@@ -45,7 +45,7 @@ function start()
# for clickhouse-server (via service)
echo
"ASAN_OPTIONS='malloc_context_size=10 verbosity=1 allocator_release_to_os_interval_ms=10000'"
>>
/etc/environment
# for clickhouse-client
export
ASAN_OPTIONS
=
'malloc_context_size=10
verbosity=1
allocator_release_to_os_interval_ms=10000'
export
ASAN_OPTIONS
=
'malloc_context_size=10 allocator_release_to_os_interval_ms=10000'
start
...
...
docker/test/stress/stress
浏览文件 @
defcd29b
...
...
@@ -28,8 +28,18 @@ def get_options(i):
options
=
""
if
0
<
i
:
options
+=
" --order=random"
if
i
%
2
==
1
:
options
+=
" --db-engine=Ordinary"
# If database name is not specified, new database is created for each functional test.
# Run some threads with one database for all tests.
if
i
%
3
==
1
:
options
+=
" --database=test_{}"
.
format
(
i
)
if
i
==
13
:
options
+=
" --client-option='memory_tracker_fault_probability=0.00001'"
return
options
...
...
src/Common/Exception.cpp
浏览文件 @
defcd29b
...
...
@@ -2,6 +2,7 @@
#include <string.h>
#include <cxxabi.h>
#include <cstdlib>
#include <Poco/String.h>
#include <common/logger_useful.h>
#include <IO/WriteHelpers.h>
...
...
@@ -36,13 +37,13 @@ namespace ErrorCodes
Exception
::
Exception
(
const
std
::
string
&
msg
,
int
code
)
:
Poco
::
Exception
(
msg
,
code
)
{
// In debug builds, treat LOGICAL_ERROR as an assertion failure.
// In debug builds
and builds with sanitizers
, treat LOGICAL_ERROR as an assertion failure.
// Log the message before we fail.
#if
ndef NDEBUG
#if
def ABORT_ON_LOGICAL_ERROR
if
(
code
==
ErrorCodes
::
LOGICAL_ERROR
)
{
LOG_
ERROR
(
&
Poco
::
Logger
::
root
(),
"Logical error: '{}'."
,
msg
);
a
ssert
(
false
);
LOG_
FATAL
(
&
Poco
::
Logger
::
root
(),
"Logical error: '{}'."
,
msg
);
a
bort
(
);
}
#endif
}
...
...
src/Common/Exception.h
浏览文件 @
defcd29b
...
...
@@ -10,6 +10,10 @@
#include <fmt/format.h>
#if !defined(NDEBUG) || defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || defined(MEMORY_SANITIZER) || defined(UNDEFINED_BEHAVIOR_SANITIZER)
#define ABORT_ON_LOGICAL_ERROR
#endif
namespace
Poco
{
class
Logger
;
}
...
...
src/Common/tests/gtest_rw_lock.cpp
浏览文件 @
defcd29b
...
...
@@ -131,7 +131,10 @@ TEST(Common, RWLockRecursive)
auto
lock2
=
fifo_lock
->
getLock
(
RWLockImpl
::
Read
,
"q2"
);
#ifndef ABORT_ON_LOGICAL_ERROR
/// It throws LOGICAL_ERROR
EXPECT_ANY_THROW
({
fifo_lock
->
getLock
(
RWLockImpl
::
Write
,
"q2"
);});
#endif
}
fifo_lock
->
getLock
(
RWLockImpl
::
Write
,
"q2"
);
...
...
src/Storages/StorageMergeTree.cpp
浏览文件 @
defcd29b
...
...
@@ -41,6 +41,7 @@ namespace ErrorCodes
extern
const
int
INCORRECT_DATA
;
extern
const
int
CANNOT_ASSIGN_OPTIMIZE
;
extern
const
int
TIMEOUT_EXCEEDED
;
extern
const
int
UNKNOWN_POLICY
;
}
namespace
ActionLocks
...
...
@@ -1331,7 +1332,7 @@ void StorageMergeTree::movePartitionToTable(const StoragePtr & dest_table, const
throw
Exception
(
"Destination table "
+
dest_table_storage
->
getStorageID
().
getNameForLogs
()
+
" should have the same storage policy of source table "
+
getStorageID
().
getNameForLogs
()
+
". "
+
getStorageID
().
getNameForLogs
()
+
": "
+
this
->
getStoragePolicy
()
->
getName
()
+
", "
+
dest_table_storage
->
getStorageID
().
getNameForLogs
()
+
": "
+
dest_table_storage
->
getStoragePolicy
()
->
getName
(),
ErrorCodes
::
LOGICAL_ERROR
);
dest_table_storage
->
getStorageID
().
getNameForLogs
()
+
": "
+
dest_table_storage
->
getStoragePolicy
()
->
getName
(),
ErrorCodes
::
UNKNOWN_POLICY
);
auto
dest_metadata_snapshot
=
dest_table
->
getInMemoryMetadataPtr
();
auto
metadata_snapshot
=
getInMemoryMetadataPtr
();
...
...
src/Storages/StorageReplicatedMergeTree.cpp
浏览文件 @
defcd29b
...
...
@@ -114,6 +114,7 @@ namespace ErrorCodes
extern
const
int
CANNOT_ASSIGN_ALTER
;
extern
const
int
DIRECTORY_ALREADY_EXISTS
;
extern
const
int
ILLEGAL_TYPE_OF_ARGUMENT
;
extern
const
int
UNKNOWN_POLICY
;
}
namespace
ActionLocks
...
...
@@ -5610,7 +5611,7 @@ void StorageReplicatedMergeTree::movePartitionToTable(const StoragePtr & dest_ta
throw
Exception
(
"Destination table "
+
dest_table_storage
->
getStorageID
().
getNameForLogs
()
+
" should have the same storage policy of source table "
+
getStorageID
().
getNameForLogs
()
+
". "
+
getStorageID
().
getNameForLogs
()
+
": "
+
this
->
getStoragePolicy
()
->
getName
()
+
", "
+
getStorageID
().
getNameForLogs
()
+
": "
+
dest_table_storage
->
getStoragePolicy
()
->
getName
(),
ErrorCodes
::
LOGICAL_ERROR
);
getStorageID
().
getNameForLogs
()
+
": "
+
dest_table_storage
->
getStoragePolicy
()
->
getName
(),
ErrorCodes
::
UNKNOWN_POLICY
);
auto
dest_metadata_snapshot
=
dest_table
->
getInMemoryMetadataPtr
();
auto
metadata_snapshot
=
getInMemoryMetadataPtr
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录