Zoltan Martonka has posted comments on this change. ( http://gerrit.cloudera.org:8080/20899 )
Change subject: [log_block_manager-test] Improve random selection ...................................................................... Patch Set 4: (2 comments) http://gerrit.cloudera.org:8080/#/c/20899/4/src/kudu/fs/log_block_manager-test.cc File src/kudu/fs/log_block_manager-test.cc: http://gerrit.cloudera.org:8080/#/c/20899/4/src/kudu/fs/log_block_manager-test.cc@1296 PS4, Line 1296: auto rng = std::default_random_engine{}; Did you consider seting a random seed? Seed seems to be randomised in some of the other tests in this file (SeedRandom()). I don't see any reason not to. (It was probably just forgotten). Also you could delete (begin + (1-ratio) * count, end) to get an absolutely superfluous perf improvement :P http://gerrit.cloudera.org:8080/#/c/20899/4/src/kudu/fs/log_block_manager-test.cc@1298 PS4, Line 1298: ids.erase(ids.begin(), ids.begin() + static_cast<int>(kLiveBlockRatio * kNumBlocks)); > Is it better to use another variable to store the to-delete ids, for exampl ids is a local variable in this 17 lines lambda. The current way seems kind of safe for me (and better performance). -- 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: 4 Gerrit-Owner: Ádám Bakai <aba...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Wang Xixu <1450306...@qq.com> Gerrit-Reviewer: Zoltan Martonka <zmarto...@cloudera.com> Gerrit-Comment-Date: Tue, 16 Jan 2024 07:48:30 +0000 Gerrit-HasComments: Yes