Todd Lipcon has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/9895 )

Change subject: KUDU-2395 (part 1): cache logged-in user
......................................................................

KUDU-2395 (part 1): cache logged-in user

The name of the current logged-in user is not expected to change over
time once the process is running. If it did change this could cause
strange effects with ACL enforcement, for one, or result in outbound RPC
connections switching credentials during the process lifetime.

Additionally, as pointed at in KUDU-2395, the lookup of the user name
from the UID sometimes needs to go to external services which may be
slow and incur lock contention.

This patch switches to computing the local username only once and
reusing the result on all subsequent lookups.

Change-Id: Ib4500d89dd91e8eed6e4ae0661b886ab3c105130
Reviewed-on: http://gerrit.cloudera.org:8080/9895
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <[email protected]>
---
M src/kudu/util/user.cc
1 file changed, 23 insertions(+), 2 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Todd Lipcon: Looks good to me, approved

--
To view, visit http://gerrit.cloudera.org:8080/9895
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4500d89dd91e8eed6e4ae0661b886ab3c105130
Gerrit-Change-Number: 9895
Gerrit-PatchSet: 3
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to