David Ribeiro Alves has submitted this change and it was merged. Change subject: Move the MetaCacheServerPicker into meta_cache.h/cc ......................................................................
Move the MetaCacheServerPicker into meta_cache.h/cc This moves the MetaCacheServerPicker into meta_cache.h/cc. Previously this would also make the picker a member of the corresponding RemoteTablet, but turns out this is problematic due to the lifecycle of KuduTable, a user controlled object that is used internally on every lookup. Specifically I tried two options: Making the picker hold a reference to KuduTable, which resulted in a memory leak due to cyclic dependencies; Just holding a plain pointer, at which time I would get a SIGSEGV due to the user deleting the object. We can likely sort the lifecycle issues in some way but I didn't look too deep into it. Change-Id: I5344e9556f7042743458efbf1a5dc8be1e45f8da Reviewed-on: http://gerrit.cloudera.org:8080/3028 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <a...@cloudera.com> --- M src/kudu/client/batcher.cc M src/kudu/client/meta_cache.cc M src/kudu/client/meta_cache.h 3 files changed, 205 insertions(+), 181 deletions(-) Approvals: Adar Dembo: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/3028 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5344e9556f7042743458efbf1a5dc8be1e45f8da Gerrit-PatchSet: 16 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: David Ribeiro Alves <david.al...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: David Ribeiro Alves <david.al...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <t...@apache.org>