Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/9806 )
Change subject: KUDU-2377: represent resource limits as uint64_t values ...................................................................... Patch Set 1: (4 comments) http://gerrit.cloudera.org:8080/#/c/9806/1/src/kudu/kserver/kserver.cc File src/kudu/kserver/kserver.cc: http://gerrit.cloudera.org:8080/#/c/9806/1/src/kudu/kserver/kserver.cc@95 PS1, Line 95: uint64_t rlimit = env->GetResourceLimit(Env::ResourceLimitType::RUNNING_THREADS_PER_EUID); Not exactly associated with this patch, but should we check /proc/sys/kernel/pid_max as well? eg on my machine pid_max is 32k even though 'ulimit -u' is 128k. In such a case we should probably respect pid_max instead. http://gerrit.cloudera.org:8080/#/c/9806/1/src/kudu/util/env_posix.cc File src/kudu/util/env_posix.cc: http://gerrit.cloudera.org:8080/#/c/9806/1/src/kudu/util/env_posix.cc@1591 PS1, Line 1591: return l.rlim_cur; can we static_assert(RLIM_INFINITY == kuint64Max) or somesuch here? I think it's somewhat evil to just assume it's -1 even though I'm sure it'll never change, and it has some doc value http://gerrit.cloudera.org:8080/#/c/9806/1/src/kudu/util/threadpool.h File src/kudu/util/threadpool.h: http://gerrit.cloudera.org:8080/#/c/9806/1/src/kudu/util/threadpool.h@124 PS1, Line 124: ThreadPoolBuilder& set_min_threads(uint64_t min_threads); per the style guide, I think these APIs should still take signed ints, otherwise if some math goes wrong and we set -1 we might end up accidentally setting a very high value. I'd rather accept signed int and be able to CHECK http://gerrit.cloudera.org:8080/#/c/9806/1/src/kudu/util/threadpool.cc File src/kudu/util/threadpool.cc: http://gerrit.cloudera.org:8080/#/c/9806/1/src/kudu/util/threadpool.cc@474 PS1, Line 474: uint64_t capacity_remaining = max_threads_ - active_threads_ + it also makes this calculation more error-prone with regard to overflows/underflows -- 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: comment Gerrit-Change-Id: I7e9bb71af886f732f36a8c93876f47e7591aeadb Gerrit-Change-Number: 9806 Gerrit-PatchSet: 1 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> Gerrit-Comment-Date: Tue, 27 Mar 2018 22:00:34 +0000 Gerrit-HasComments: Yes