Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18472 )

Change subject: jwt: determine discovery endpoint from token
......................................................................


Patch Set 22:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/18472/20/src/kudu/util/jwt-util.cc
File src/kudu/util/jwt-util.cc:

http://gerrit.cloudera.org:8080/#/c/18472/20/src/kudu/util/jwt-util.cc@960
PS20, Line 960:
> A lock here is necessary as there might be a lookup here while another thre
Right.  The point was to shorten the time when the lock is held, and avoid 
makeing remote calls while holding the lock.


http://gerrit.cloudera.org:8080/#/c/18472/22/src/kudu/util/jwt-util.cc
File src/kudu/util/jwt-util.cc:

http://gerrit.cloudera.org:8080/#/c/18472/22/src/kudu/util/jwt-util.cc@1008
PS22, Line 1008:     RETURN_NOT_OK_PREPEND(new_helper->Init(jwks_uri, 
/*is_local_file*/ false),
               :                           "Error initializing JWT helper");
This results either in IO which might take long time or in a remote call.  
Holding a lock (especially a busy-waiting one) while making a remote call is a 
no-no.

Once again: why not to limit the lifetime of the lock to the time interval when 
accessing the 'jwt_by_account_id_' dictionary?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I970bcc6d894c0206160196418d549b71c35ac973
Gerrit-Change-Number: 18472
Gerrit-PatchSet: 22
Gerrit-Owner: Andrew Wong <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>
Gerrit-Comment-Date: Wed, 01 Feb 2023 20:17:32 +0000
Gerrit-HasComments: Yes

Reply via email to