]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: fix improper input/testing range of crush somke testing 17179/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 23 Aug 2017 03:31:35 +0000 (11:31 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 23 Aug 2017 05:50:29 +0000 (13:50 +0800)
commite128a1e913fb4a224e392cd09203fc7cf4fa9f5f
tree3a31392c7c1f2234f48d125ee42490fc93965417
parent05f16b490e7b6ff5c3913929baba1b5d07f21f9c
mon/OSDMonitor: fix improper input/testing range of crush somke testing

CrushTester::test() will reset testing range to [0, 1023] whenever
min_x or max_x is negative and the constructor of CrushTester will
always default min_x and max_x to -1.

Thus to set the test range correctly, you have to specify both min_x and max_x.
Local test shows this patch shall decrease the time consumed by the crush
smoke testing to approximate 1/20 of those without this.

For exmaple:
crush somke test duration: 0.668354 seconds ->
crush somke test duration: 0.012592 seconds

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mon/OSDMonitor.cc