主从同步性能优化,主从同步性能测试。

This commit is contained in:
1iaan
2026-02-01 16:49:50 +00:00
parent 003566b69a
commit 6d1a50cf88
31 changed files with 2119 additions and 400 deletions

View File

@@ -235,13 +235,22 @@ int kvs_array_save(iouring_ctx_t *uring, kvs_array_t *inst, const char* filename
for (int i = 0; i < count; i++) total += lens[i];
task_t *t = submit_write(uring, fd, bufs, lens, count, current_off);
cleanup_finished_iouring_tasks();
if (!t) { close(fd); return -4; }
if (!t) {
perror("task init failed");
goto clean;
}
current_off += (off_t) total;
}
clean:
while (!uring_task_complete(uring)) {
usleep(1000);
cleanup_finished_iouring_tasks();
}
close(fd);
return 0;
}