apache / kvrocks

Apache Kvrocks is a distributed key value NoSQL database that uses RocksDB as storage engine and is compatible with Redis protocol.
https://kvrocks.apache.org/
Apache License 2.0
3.47k stars 452 forks source link

Can't run only unixsocket, without any TCP. #805

Closed aleksraiden closed 2 years ago

aleksraiden commented 2 years ago

Search before asking

Motivation

In local env, when we configure fro maximal performance, we want use only unixsocket, without any TCP. If I comment bind and port options and uncomment unixsocket, after start, kvrocks try to bing localhost:6666 port, ignoring disable option. In other hands, Redis works very well :)

Solution

Not trying to bind TCP if both options are disabled (bind and port)

Are you willing to submit a PR?

aleksraiden commented 2 years ago

Update: if we have one another instance kvrocks with TCP, second server instance with commented options not runned with message: main.cc:293] Could not create server TCP since the specified port[6666] is already in use

torwig commented 2 years ago

If everyone is OK with it, I'll try to resolve this issue.

git-hulk commented 2 years ago

Thanks to @aleksraiden and @torwig, I think we can do this since no objection.

aleksraiden commented 2 years ago

After little bit more deep investigation, we improve config check and comparability with Cluster mode. So, if you are turn on cluster or replication settings, you can't run without TCP. Thanks to @torwig

git-hulk commented 2 years ago

After little bit more deep investigation, we improve config check and comparability with Cluster mode. So, if you are turn on cluster or replication settings, you can't run without TCP. Thanks to @torwig

Yes, exactly. This is really a good point.