os/bluestore: avoid resharding if the last shard size fall below shar… #12447

Merged
merged 1 commit into from Dec 13, 2016

Projects

None yet

4 participants

@ifed01
Contributor
ifed01 commented Dec 12, 2016

…d min size. This might cause permanent resharding since the last shard tend to be small.

Signed-off-by: Igor Fedotov ifedotov@mirantis.com

src/os/bluestore/BlueStore.cc
<< " extents" << dendl;
if (!force &&
(len > g_conf->bluestore_extent_map_shard_max_size ||
- len < g_conf->bluestore_extent_map_shard_min_size)) {
+ ( n == shards.end() && len < g_conf->bluestore_extent_map_shard_min_size) //do not apply shard_min_size to the last shard since this might trigger permanent resharding
@somnathr
somnathr Dec 12, 2016 Contributor

Can you put the comment on top probably as it is invisible here because of the column limit ?

Since we want to exclude last shard , won't it be ( n != shards.end()) ?

@ifed01
Contributor
ifed01 commented Dec 12, 2016

@somnathr. Yeah it has to be != shard.end() indeed. Updated. Thanks.

@somnathr
Contributor

LGTM

@liewegas liewegas added the bluestore label Dec 12, 2016
@liewegas liewegas added the needs-qa label Dec 12, 2016
@xiexingguo
Contributor

LGTM also

@ifed01
Contributor
ifed01 commented Dec 13, 2016

[ OK ] ObjectStore/StoreTest.TooManyBlobsTest/2 (75167 ms)
[----------] 66 tests from ObjectStore/StoreTest (11530171 ms total)

[----------] Global test environment tear-down
[==========] 66 tests from 1 test case ran. (11530172 ms total)
[ PASSED ] 66 tests.

@ifed01 ifed01 os/bluestore: avoid resharding if the last shard size fall below shar…
…d min size

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
3530606
@liewegas liewegas merged commit c6198c3 into ceph:master Dec 13, 2016

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
@ifed01 ifed01 deleted the ifed01:wip-bluestore-fix-reshard2 branch Dec 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment