TD-1847
This commit is contained in:
parent
f07f456b08
commit
83f71e2463
|
@ -70,7 +70,7 @@ void *walOpen(char *path, SWalCfg *pCfg) {
|
|||
tstrncpy(pWal->path, path, sizeof(pWal->path));
|
||||
pthread_mutex_init(&pWal->mutex, NULL);
|
||||
|
||||
pWal->fsyncSeq = pCfg->fsyncPeriod % 1000;
|
||||
pWal->fsyncSeq = pCfg->fsyncPeriod / 1000;
|
||||
if (pWal->fsyncSeq <= 0) pWal->fsyncSeq = 1;
|
||||
|
||||
if (walInitObj(pWal) != TSDB_CODE_SUCCESS) {
|
||||
|
|
|
@ -116,7 +116,7 @@ void walFsync(void *handle, bool forceFsync) {
|
|||
if (pWal == NULL || pWal->fd < 0) return;
|
||||
|
||||
if (forceFsync || (pWal->level == TAOS_WAL_FSYNC && pWal->fsyncPeriod == 0)) {
|
||||
wTrace("vgId:%d, file:%s, do fsync, force:%d", pWal->vgId, pWal->name, forceFsync);
|
||||
wTrace("vgId:%d, file:%s, do fsync", pWal->vgId, pWal->name);
|
||||
if (fsync(pWal->fd) < 0) {
|
||||
wError("vgId:%d, file:%s, fsync failed since %s", pWal->vgId, pWal->name, strerror(errno));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue