Adar Dembo has posted comments on this change. Change subject: block_manager: various changes to disk space reservation checking ......................................................................
Patch Set 4: (4 comments) http://gerrit.cloudera.org:8080/#/c/4831/4/src/kudu/fs/block_manager-test.cc File src/kudu/fs/block_manager-test.cc: Line 933: ASSERT_EQ(1, bm_->available_containers_by_data_dir_.begin()->second.size()); > mind adding quick comment about what this is asserting on? The existing comment describes it though: we're asserting that we've got a single container, both in all_containers_ (a raw list of containers) and in available_containers_by_data_dir_ (a map of data dir to container). http://gerrit.cloudera.org:8080/#/c/4831/4/src/kudu/fs/data_dirs.cc File src/kudu/fs/data_dirs.cc: Line 55: DEFINE_int64(fs_data_dirs_reserved_bytes, 0, > We'll have to doc this as breaking config backcompat but I think it is reas Hmm, how have my changes broken backwards compatibility for fs_data_dirs_reserved_bytes? It's still there with the same name, and it has more or less the same effect (enforces a "soft" limit). Line 67: METRIC_DEFINE_gauge_uint64(server, data_dirs_full, > We should probably also provide a gauge metric for number of configured dat I thought about adding that, but the number doesn't change at runtime (it's purely based off of what was configured in --fs_data_dirs), so I didn't think it was worth it. http://gerrit.cloudera.org:8080/#/c/4831/4/src/kudu/util/env_util.cc File src/kudu/util/env_util.cc: Line 136: if (bytes_free - requested_bytes <= reserved_bytes) { > Why make this change? Semantically it seems off by one. I made this change to keep disk_reservation-itest passing. The issue is this: when requested_bytes is 0 (as it is now when checking data dir fullness) and reserved_bytes is 0 (as it is in disk_reservation-itest), a simulated bytes_free value of 0 isn't low enough to hit the error path. However, I can just as easily fix this by changing disk_reservation-itest to reserve one byte (so that reserved_bytes is 1). I'll do that instead. -- To view, visit http://gerrit.cloudera.org:8080/4831 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ica2bb710a246ef09890554d1d6ff6da528145a6e Gerrit-PatchSet: 4 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar Dembo <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-HasComments: Yes
