Kurt Deschler has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22164 )

Change subject: KUDU-613: Vector optimizations
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/22164/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/22164/1//COMMIT_MSG@16
PS1, Line 16: The method 'InsertAndReturnEvicted' returns a
            : vector with the evicted entries. Rather than
            : returning a copy of the vector, the vector of
            : evicted entries is now a parameter to the function
            : so it's passed by pointer.
> Good to know. This does seem unnecessary since in C++17 and later NRVO is g
It would be better to pass as an arg in case the compiler does not do this 
optimization and so debug is consistent. Also pass by reference rather than 
pointer.


http://gerrit.cloudera.org:8080/#/c/22164/1/src/kudu/util/slru_cache.cc
File src/kudu/util/slru_cache.cc:

http://gerrit.cloudera.org:8080/#/c/22164/1/src/kudu/util/slru_cache.cc@508
PS1, Line 508:   protected_shard_.InsertAndReturnEvicted(val_handle, 
&evictions);
> Just for visibility: I don’t think I quite get it. InsertAndReturnEvicted i
Ok then break up the function into something that can be called in a loop. We 
should not allocate memory under locks like this.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0cb24b05724fdf5c1e975ac83c0cdc23c51f9f36
Gerrit-Change-Number: 22164
Gerrit-PatchSet: 1
Gerrit-Owner: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Mahesh Reddy <[email protected]>
Gerrit-Comment-Date: Fri, 06 Dec 2024 02:07:38 +0000
Gerrit-HasComments: Yes

Reply via email to