You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Dinesh Bhat (Code Review)" <ge...@cloudera.org> on 2016/12/09 09:18:03 UTC
[kudu-CR] KUDU-1798: [env] File manager broken on OS X
Hello Adar Dembo, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/5438
to look at the new patch set (#2).
Change subject: KUDU-1798: [env] File manager broken on OS X
......................................................................
KUDU-1798: [env] File manager broken on OS X
Env::IncreaseOpenFileLimit() relies upon few system calls
which behave slightly differently on OS X than on linux.
setrlimit() returns EINVAL if specified limit is RLIM_INFINITY.
getrlimit() happen to return rlim_max=RLIM_INFINITY on OS X
because apparently OS X doesn't enforce the open file limit.
So if we try to bump up the current limit to max limit,
it returns EINVAL on OS X. This patch addresses this issue
with a workaround aimed towards OS X only. Here we issue
sysctlbyname("kern.maxfilesperproc") to fetch the underlying
limit imposed by the OS X kernel to set that as rlim_max value.
OS X 10.x releases seem to support max 10240 open fds
per process. Also added a small test to verify this change.
Change-Id: Idb18b4e52ad80f89f61a92898c50c479643c12ec
---
M src/kudu/util/env-test.cc
M src/kudu/util/env_posix.cc
2 files changed, 31 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/38/5438/2
--
To view, visit http://gerrit.cloudera.org:8080/5438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idb18b4e52ad80f89f61a92898c50c479643c12ec
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins