apache / kvrocks

Apache Kvrocks is a distributed key value NoSQL database that uses RocksDB as storage engine and is compatible with Redis protocol.

Home Page:https://kvrocks.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conflicting PID file locations in config comments

der-eismann opened this issue · comments

Search before asking

  • I had searched in the issues and found no similar issues.

Version

2.9.0

Minimal reproduce step

What did you expect to see?

Correct and precise comments

What did you see instead?

First in the config it says

# By default, kvrocks does not run as a daemon. Use 'yes' if you need it.
# Note that kvrocks will write a PID file in /var/run/kvrocks.pid when daemonized
daemonize no

and then

# When running in daemonize mode, kvrocks writes a PID file in ${CONFIG_DIR}/kvrocks.pid by
# default. You can specify a custom pid file location here.
# pidfile /var/run/kvrocks.pid

And /var/run is definitely not a ${CONFIG_DIR}. One of these two seems to be off.

Anything Else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
commented

Hi @der-eismann

Thanks for your report. The default pidfile should be located in {dir}/kvrocks.pid instead of {CONFIG_DIR} or /var/run dir. For the implementation, please refer to https://github.com/apache/kvrocks/blob/unstable/src/config/config.cc#L415