This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new ceee153 [net_util] fix comment on maximum PID in 18-bit space
ceee153 is described below
commit ceee153a4793a851667b27c36f2c16b23036259b
Author: Alexey Serbin <[email protected]>
AuthorDate: Fri Jul 12 18:13:25 2019 -0700
[net_util] fix comment on maximum PID in 18-bit space
This changelist does not contain any functional modifications.
Change-Id: Ic3226c1b8c928e1558c9e62b7e43c80bdd8745e9
Reviewed-on: http://gerrit.cloudera.org:8080/13859
Reviewed-by: Adar Dembo <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
---
src/kudu/util/net/net_util.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/kudu/util/net/net_util.cc b/src/kudu/util/net/net_util.cc
index ae35456..c9f1129 100644
--- a/src/kudu/util/net/net_util.cc
+++ b/src/kudu/util/net/net_util.cc
@@ -73,8 +73,10 @@ using strings::Substitute;
namespace kudu {
-// Allow 18-bit PIDs, max PID up to 147456, for binding in UNIQUE_LOOPBACK
mode.
+// Allow 18-bit PIDs, max PID up to 262143, for binding in UNIQUE_LOOPBACK
mode.
static const int kPidBits = 18;
+// The PID and server indices share the same 24-bit space. The 24-bit space
+// corresponds to the 127.0.0.0/8 subnet.
static const int kServerIdxBits = 24 - kPidBits;
// The maximum allowed number of 'indexed servers' for binding in
UNIQUE_LOOPBACK mode.
const int kServersMaxNum = (1 << kServerIdxBits) - 2;