Merge pull request #755 from taosdata/feature/lihui

[TBASE-1123]
This commit is contained in:
Bomin Zhang 2019-11-21 17:57:57 +08:00 committed by GitHub
commit 8715de7fa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -586,9 +586,13 @@ void taosKillSystem() {
kill(tsProcId, 2);
}
extern int tsEnableCoreFile;
int _sysctl(struct __sysctl_args *args );
void taosSetCoreDump() {
if (0 == tsEnableCoreFile) {
return;
}
// 1. set ulimit -c unlimited
struct rlimit rlim;
struct rlimit rlim_new;

View File

@ -163,6 +163,7 @@ int tsTelegrafUseFieldNum = 0;
int tsAdminRowLimit = 10240;
int tsTscEnableRecordSql = 0;
int tsEnableCoreFile = 0;
int tsRpcTimer = 300;
int tsRpcMaxTime = 600; // seconds;
@ -772,6 +773,11 @@ static void doInitGlobalConfig() {
tsInitConfigOption(cfg++, "tscEnableRecordSql", &tsTscEnableRecordSql, TSDB_CFG_VTYPE_INT,
TSDB_CFG_CTYPE_B_CONFIG,
1, 100000, 0, TSDB_CFG_UTYPE_NONE);
tsInitConfigOption(cfg++, "enableCoreFile", &tsEnableCoreFile, TSDB_CFG_VTYPE_INT,
TSDB_CFG_CTYPE_B_CONFIG,
1, 100000, 0, TSDB_CFG_UTYPE_NONE);
// version info
tsInitConfigOption(cfg++, "gitinfo", gitinfo, TSDB_CFG_VTYPE_STRING,
TSDB_CFG_CTYPE_B_SHOW | TSDB_CFG_CTYPE_B_CLIENT,
@ -784,6 +790,7 @@ static void doInitGlobalConfig() {
0, 0, 0, TSDB_CFG_UTYPE_NONE);
tsGlobalConfigNum = (int)(cfg - tsGlobalConfig);
assert(tsGlobalConfigNum <= TSDB_CFG_MAX_NUM);
}
static pthread_once_t initGlobalConfig = PTHREAD_ONCE_INIT;