impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Csaba Ringhofer (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5624: ProcessStateInfo::ReadProcFileDescriptorInfo() should not fork a process
Date Tue, 14 Nov 2017 18:47:45 GMT
Csaba Ringhofer has uploaded this change for review. ( http://gerrit.cloudera.org:8080/8546


Change subject: IMPALA-5624: ProcessStateInfo::ReadProcFileDescriptorInfo() should not fork
a process
......................................................................

IMPALA-5624: ProcessStateInfo::ReadProcFileDescriptorInfo() should not fork a process

Running shell commands from impalad can be problematic, because using popen leads
to forking which causes a spike in virtual memory. To avoid this, "ls" is replaced
with posix api calls.

FileDescriptorMap fd_desc_ was only used to get the number of file descriptors, so
it was unneccesery work to initialize it. It is removed, and only the number of file
descriptors is computed.

No automatic test is created for this function, because there is no way to know the
"expected value" in advance, and the number of file desciptors can change anytime.

Change-Id: Ibffae8069a62e100abbfa7d558b49040b095ddc0
---
M be/src/util/process-state-info.cc
M be/src/util/process-state-info.h
2 files changed, 15 insertions(+), 25 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/46/8546/2
-- 
To view, visit http://gerrit.cloudera.org:8080/8546
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibffae8069a62e100abbfa7d558b49040b095ddc0
Gerrit-Change-Number: 8546
Gerrit-PatchSet: 2
Gerrit-Owner: Csaba Ringhofer <csringhofer@cloudera.com>

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message