Ashwani Raina has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/20270 )

Change subject: KUDU-3461 [client] Avoid impala crash by returning error if 
invalid tablet id found
......................................................................


Patch Set 12:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/20270/10/src/kudu/client/meta_cache.cc
File src/kudu/client/meta_cache.cc:

http://gerrit.cloudera.org:8080/#/c/20270/10/src/kudu/client/meta_cache.cc@1291
PS10, Line 1291:
               : Status MetaCache::FastLookupTabletByKey(const KuduTable* table,
               :                                         PartitionKey 
partition_key,
               :                                         MetaCache::LookupType 
lookup_type,
               :                                         
scoped_refptr<RemoteTablet>* remote_tablet) {
               :
> Ah, I see: I didn't notice the call site of the new method was in MetaCache
The issue at hand here is that PickLeader logic could potentially run into 
infinite recursion because of the way it is implemented. Metacache class 
methods have certain responsibilities that they are fulfilling as expected. For 
example, LookUpTabletByKey is supposed to first check local cache for fastpath 
lookup and proceed to slowpath only when fastpath fails. It doesn't know how 
callers are using this information. In this case, Metacache class method 
(LookUpTabletByKey) finds out that cache entry is stale and even marks the same 
and makes a RPC call to get a fresh one from server, it the way batcher and 
MetacacheServerPicker methods use this information, results into a recursion 
scenario.

I don't think MetaCache methods needs to know the details of how we used the 
tablet id information to detect the potential recursion scenario and handle the 
same.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia09cf6fb1b1d10f1ad13a62b5c863bcd1e3ab26a
Gerrit-Change-Number: 20270
Gerrit-PatchSet: 12
Gerrit-Owner: Ashwani Raina <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Ashwani Raina <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Wang Xixu <[email protected]>
Gerrit-Comment-Date: Wed, 30 Aug 2023 14:23:46 +0000
Gerrit-HasComments: Yes

Reply via email to