sofastack / sofa-jraft

A production-grade java implementation of RAFT consensus algorithm.
https://www.sofastack.tech/projects/sofa-jraft/
Apache License 2.0
3.57k stars 1.14k forks source link

`LOG` file keep growing risk #973

Closed chenzhiguo closed 1 year ago

chenzhiguo commented 1 year ago

Describe the bug

File LOG in the directory raft_data/raft_data_region_-1_8182/log/ keeps growing, resulting in a large file. Is there any way to automatically clear or cancel the writing of this file? Such unlimited growth in the online environment is risky.

Expected behavior

Control no output or periodic cleaning

Actual behavior

Keep growing

Can I delete this file directly? Or run echo "" > LOG to clean file content. @fengjiachun @killme2008

killme2008 commented 1 year ago

The log will keep growing unless you enable snapshot.

Please read the jraft user guide before using jraft, thank you.