You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/09/05 06:15:32 UTC

[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #809: If unix socket is specified, don't listen default TCP if addr:port wasn't set

PragmaTwice commented on code in PR #809:
URL: https://github.com/apache/incubator-kvrocks/pull/809#discussion_r962513038


##########
src/config.cc:
##########
@@ -539,6 +538,21 @@ Status Config::finish() {
   if ((cluster_enabled) && !tokens.empty()) {
     return Status(Status::NotOK, "enabled cluster mode wasn't allowed while the namespace exists");
   }
+  if (unixsocket.empty()) {
+    if (binds.size() == 0) {
+      binds.emplace_back(kDefaultBindAddress);
+    }
+    if (port == 0) {
+      port = kDefaultPort;
+    }

Review Comment:
   I think if in current config, `port == 0` and `unixsocket` is empty, kvrocks would be better to report an error and then terminate, rather than assigning a default port.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org