Hello Kudu Jenkins, Grant Henke, Todd Lipcon,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/9806

to look at the new patch set (#2).

Change subject: util: use uint64_t values for resource limits and adjust usages
......................................................................

util: use uint64_t values for resource limits and adjust usages

Turns out rlim_t is an unsigned 64-bit type, and although a root shell on my
laptop won't let me set RLIMIT_NOFILE particularly high, I can set
RLIMIT_NPROC to any value, and even to RLIM_INFINITY (-1).

So to handle every value correctly, we should really be treating these as
uint64_t rather than int64_t. That also gives us correct RLIM_INFINITY
handling for free, because -1 becomes kuint64max. This also effectively
reverts commit 17aceda.

However, not all callers expect uint64_t values, so some conversion is still
necessary. I also took the opportunity to beef up how the resource limits
were used by incorporating the values of /proc/sys/kernel/pid_max,
/proc/sys/kernel/threads-max, and /proc/sys/fs/file-max as upper bounds.

Change-Id: I7e9bb71af886f732f36a8c93876f47e7591aeadb
---
M src/kudu/fs/block_manager.cc
M src/kudu/kserver/kserver.cc
M src/kudu/util/env.h
M src/kudu/util/env_posix.cc
4 files changed, 58 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/06/9806/2
--
To view, visit http://gerrit.cloudera.org:8080/9806
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7e9bb71af886f732f36a8c93876f47e7591aeadb
Gerrit-Change-Number: 9806
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Grant Henke <granthe...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to