Ádám Bakai has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/20899 )

Change subject: [log_block_manager-test] Improve random selection
......................................................................


Patch Set 12:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/20899/12/src/kudu/fs/log_block_manager-test.cc
File src/kudu/fs/log_block_manager-test.cc:

http://gerrit.cloudera.org:8080/#/c/20899/12/src/kudu/fs/log_block_manager-test.cc@1296
PS12, Line 1296: std::default_random_engine
> Is it a requirement to use std::default_random_engine which is implementati
Done


http://gerrit.cloudera.org:8080/#/c/20899/12/src/kudu/fs/log_block_manager-test.cc@1297
PS12, Line 1297: rng
> nit: could use the instance of the 'rng' in-place since it's not needed els
Done


http://gerrit.cloudera.org:8080/#/c/20899/12/src/kudu/fs/log_block_manager-test.cc@1298
PS12, Line 1298: 1
> style nit: 1.0
Done


http://gerrit.cloudera.org:8080/#/c/20899/12/src/kudu/fs/log_block_manager-test.cc@1299
PS12, Line 1299:
> If you want to call AddDeletedBlock for the (1.0 - kLiveBlockRatio) of all
No, it wouldn't work. In the test kLiveBlockRatio = 0.1. If I erase everything 
from the  kLiveBlockRatio * kNumBlocks position till the end, it ends up only 
10% in the ids. And delete is called only on those elements.

This was the solution in a previous patch set:
    ids.erase(ids.begin(), ids.begin() + static_cast<int>(kLiveBlockRatio * 
kNumBlocks));

It does the same thing as the current solution, but Zoltan Martonka suggested 
that this type of delete is more efficient. I'm ok with either solution to 
delete the elements.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9f73f0572319784b07845b02d15a7d3e6f31abce
Gerrit-Change-Number: 20899
Gerrit-PatchSet: 12
Gerrit-Owner: Ádám Bakai <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Wang Xixu <[email protected]>
Gerrit-Reviewer: Zoltan Martonka <[email protected]>
Gerrit-Reviewer: Ádám Bakai <[email protected]>
Gerrit-Comment-Date: Wed, 21 Feb 2024 13:38:52 +0000
Gerrit-HasComments: Yes

Reply via email to