提交 3e2c24d9 编写于 作者: C Cary Xu

other: add debug logs

上级 b5c6d563
......@@ -250,11 +250,13 @@ int32_t walBeginSnapshot(SWal *pWal, int64_t ver) {
}
int32_t walEndSnapshot(SWal *pWal) {
uInfo("%s:%d rsma: WAL walEndSnapshot entry for %s", __func__, __LINE__, pWal->path);
int32_t code = 0;
taosThreadMutexLock(&pWal->mutex);
int64_t ver = pWal->vers.verInSnapshotting;
if (ver == -1) {
code = -1;
uInfo("%s:%d rsma: WAL walEndSnapshot code = -1 for %s", __func__, __LINE__, pWal->path);
goto END;
};
......@@ -291,12 +293,15 @@ int32_t walEndSnapshot(SWal *pWal) {
}
char fnameStr[WAL_FILE_LEN];
// remove file
uInfo("%s:%d rsma: WAL walEndSnapshot deleteCnt=%d %s", __func__, __LINE__, (int32_t)deleteCnt, pWal->path);
for (int i = 0; i < deleteCnt; i++) {
pInfo = taosArrayGet(pWal->fileInfoSet, i);
walBuildLogName(pWal, pInfo->firstVer, fnameStr);
taosRemoveFile(fnameStr);
uInfo("rsma: removed WAL log file %s", fnameStr);
walBuildIdxName(pWal, pInfo->firstVer, fnameStr);
taosRemoveFile(fnameStr);
uInfo("rsma: removed WAL idx file %s", fnameStr);
}
// make new array, remove files
......@@ -307,6 +312,8 @@ int32_t walEndSnapshot(SWal *pWal) {
} else {
pWal->vers.firstVer = ((SWalFileInfo *)taosArrayGet(pWal->fileInfoSet, 0))->firstVer;
}
} else {
uInfo("%s:%d rsma: WAL walEndSnapshot %s", __func__, __LINE__, pWal->path);
}
pWal->writeCur = taosArrayGetSize(pWal->fileInfoSet) - 1;
pWal->totSize = newTotSize;
......
......@@ -49,7 +49,7 @@ $replica = 3
$vgroups = 1
print ============= create database
sql create database db replica $replica vgroups $vgroups
sql create database db replica $replica vgroups $vgroups retentions 3s:7d,5s:21d,15s:365d
$loop_cnt = 0
check_db_ready:
......@@ -113,7 +113,7 @@ endi
vg_ready:
print ====> create stable/child table
sql create table stb (ts timestamp, c1 int, c2 float, c3 double) tags (t1 int)
sql create table stb (ts timestamp, c1 int, c2 float, c3 double) tags (t1 int) rollup(max)
sql show stables
if $rows != 1 then
......@@ -132,7 +132,7 @@ print ===> write 100 records
$N = 100
$count = 0
while $count < $N
$ms = 1591200000000 + $count
$ms = 1658924000000 + $count
sql insert into ct1 values( $ms , $count , 2.1, 3.1)
$count = $count + 1
endw
......@@ -149,7 +149,7 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 10000
########################################################
print ===> start dnode1 dnode2 dnode3 dnode4
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册