提交 b8e60b79 编写于 作者: S Shengliang Guan

TD-1894

上级 a1f2ad0d
......@@ -50,6 +50,7 @@ typedef struct {
int32_t fsyncPeriod;
int32_t fsyncSeq;
int8_t stop;
int8_t reserved[3];
char path[WAL_PATH_LEN];
char name[WAL_FILE_LEN];
pthread_mutex_t mutex;
......
......@@ -133,9 +133,7 @@ void walClose(void *handle) {
while (walGetNextFile(pWal, &fileId) >= 0) {
snprintf(pWal->name, sizeof(pWal->name), "%s/%s%" PRId64, pWal->path, WAL_PREFIX, fileId);
if (fileId == pWal->fileId) {
wDebug("vgId:%d, wal:%p file:%s, it is closed and kept", pWal->vgId, pWal, pWal->name);
} else if (remove(pWal->name) < 0) {
if (remove(pWal->name) < 0) {
wError("vgId:%d, wal:%p file:%s, failed to remove", pWal->vgId, pWal, pWal->name);
} else {
wDebug("vgId:%d, wal:%p file:%s, it is removed", pWal->vgId, pWal, pWal->name);
......
......@@ -8,8 +8,8 @@ sleep 3000
sql connect
$i = 0
$dbPrefix = tb_in_db
$tbPrefix = tb_in_tb
$dbPrefix = d
$tbPrefix = t
$db = $dbPrefix . $i
$tb = $tbPrefix . $i
......@@ -22,28 +22,27 @@ sql create table $tb (ts timestamp, speed int)
$x = 0
while $x < 10
$ms = $x . m
sql insert into $tb values (now + $ms , $x )
$cc = $x * 60000
$ms = 1601481600000 + $cc
sql insert into $tb values ($ms , $x )
$x = $x + 1
endw
print =============== step 2
sql insert into $tb values (now - 5m , 10)
sql insert into $tb values (now - 6m , 10)
sql insert into $tb values (now - 7m , 10)
sql insert into $tb values (now - 8m , 10)
$x = 0
while $x < 5
$cc = $x * 60000
$ms = 1551481600000 + $cc
sql insert into $tb values ($ms , $x )
$x = $x + 1
endw
sql select * from $tb
print $rows points data are retrieved
if $rows != 14 then
return -1
endi
sql drop database $db
sleep 1000
sql show databases
if $rows != 0 then
if $rows != 15 then
return -1
endi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册