Adar Dembo has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/14745 )

Change subject: [util] Import Impala's block based BloomFilter
......................................................................


Patch Set 9: Code-Review+2

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14745/5/src/kudu/util/block_bloom_filter-test.cc
File src/kudu/util/block_bloom_filter-test.cc:

http://gerrit.cloudera.org:8080/#/c/14745/5/src/kudu/util/block_bloom_filter-test.cc@88
PS5, Line 88:   ASSERT_STR_CONTAINS(s.ToString(), "Bloom filter too large");
> Callers of CreateBloomFilter() need to act on the returned BFF. So if I wer
In this situation (when there's a clear "owner" of an object, and a bunch of 
non-owning accesses to it), we use unique_ptr to convey ownership, and raw 
pointers to grant temporary access. The advantage of doing this is you can 
avoid the (locked) ref inc/dec operations that are incurred as shared_ptrs are 
handed out to new callers. When the ownership isn't clear, or when it's truly 
shared, we eat the cost of the inc/dec ops and use a shared_ptr.

It doesn't matter in a test where perf isn't an issue, so feel free to keep it 
as-is if you like.


http://gerrit.cloudera.org:8080/#/c/14745/7/src/kudu/util/block_bloom_filter.cc
File src/kudu/util/block_bloom_filter.cc:

http://gerrit.cloudera.org:8080/#/c/14745/7/src/kudu/util/block_bloom_filter.cc@177
PS7, Line 177: this->
> Yes, we need to specify the object explicitly, so "this" is unavoidable to
Ugh I hate that stuff. Thanks for figuring it out.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I89c54a051c5093cf5fb81481a47a0a6677d7d906
Gerrit-Change-Number: 14745
Gerrit-PatchSet: 9
Gerrit-Owner: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Comment-Date: Fri, 06 Dec 2019 00:19:28 +0000
Gerrit-HasComments: Yes

Reply via email to