Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/13975 )
Change subject: Consider the available space when selecting data dirs for blocks. ...................................................................... Patch Set 10: (5 comments) http://gerrit.cloudera.org:8080/#/c/13975/10/src/kudu/fs/data_dirs.h File src/kudu/fs/data_dirs.h: http://gerrit.cloudera.org:8080/#/c/13975/10/src/kudu/fs/data_dirs.h@207 PS10, Line 207: available_bytes_ // Protects 'last_space_check_', 'is_full_' and 'available_bytes_'. http://gerrit.cloudera.org:8080/#/c/13975/10/src/kudu/fs/data_dirs.h@338 PS10, Line 338: those the one ? http://gerrit.cloudera.org:8080/#/c/13975/10/src/kudu/fs/data_dirs.h@340 PS10, Line 340: ,r nit: keep the blank space. http://gerrit.cloudera.org:8080/#/c/13975/10/src/kudu/fs/data_dirs.cc File src/kudu/fs/data_dirs.cc: http://gerrit.cloudera.org:8080/#/c/13975/10/src/kudu/fs/data_dirs.cc@261 PS10, Line 261: last_space_check_ How about change it to expiry meaning, then we don't need to add FLAGS_fs_data_dirs_available_space_cache_seconds every time. http://gerrit.cloudera.org:8080/#/c/13975/10/src/kudu/fs/data_dirs.cc@1072 PS10, Line 1072: shuffle(candidate_indices.begin(), candidate_indices.end(), default_random_engine(rng_.Next())); Seems some redundant with L994~L1006, how about do some refactor? Add a function: Input: candidate_indices, rule(prefer space or tablet count) Output: selected dir, candidate_indices remains -- To view, visit http://gerrit.cloudera.org:8080/13975 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I194c4965ee64aed728e3b84e684c04d445cbe529 Gerrit-Change-Number: 13975 Gerrit-PatchSet: 10 Gerrit-Owner: ZhangYao <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Reviewer: ZhangYao <[email protected]> Gerrit-Comment-Date: Tue, 13 Aug 2019 05:30:53 +0000 Gerrit-HasComments: Yes
