ZhangYao 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 6: (1 comment) http://gerrit.cloudera.org:8080/#/c/13975/6/src/kudu/fs/data_dirs.cc File src/kudu/fs/data_dirs.cc: http://gerrit.cloudera.org:8080/#/c/13975/6/src/kudu/fs/data_dirs.cc@991 PS6, Line 991: : if (FLAGS_refresh_is_full_with_expired_only_for_testing) { : // This currently should only be reached by disk_failure-itest. : refresh_mode = DataDir::RefreshMode::EXPIRED_ONLY; : } > I'm confused about why this is necessary. Why do we need this here? 1. FLAGS_refresh_is_full_with_expired_only_for_testing That is necessary because DiskErrorITest.TestFailDuringScanWorkload(with DISK_FAILURE) wanted all tablets fail because DISK_FAILURE and then recovery. It only inject that diskerror in one dir. When the FlushMrs running backend try to write data it will get injected disk failure while preallocate space, so all tablets in that dir will fail. However, after my change I will really check dirs space so that "disk error dir" will not be selected, so all tablets will not fail. That why I have to change the behaviors when doing test. 2. Dirs in same disk have the same available space. In my docker machine it work like that. So if all dir located in the same disk, it do need try to select one which have fewer tablets :) -- 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: 6 Gerrit-Owner: ZhangYao <triplesheep0...@gmail.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yingchun Lai <405403...@qq.com> Gerrit-Reviewer: ZhangYao <triplesheep0...@gmail.com> Gerrit-Comment-Date: Tue, 06 Aug 2019 05:43:26 +0000 Gerrit-HasComments: Yes