This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new acde027b0 [fs] check block size match only for block managers
acde027b0 is described below
commit acde027b0c73bf41a4c50f1e7feebe2a3ab2b53d
Author: Alexey Serbin <[email protected]>
AuthorDate: Wed Jul 31 17:34:04 2024 -0700
[fs] check block size match only for block managers
Since the block size-related constraints affect only the implementation
of log block managers, this patch enables the extra sanity check in
DirInstanceMetadataFile::LoadFromDisk() only when Kudu's data is
controlled by 'log' or 'logr' block manager.
This allows for running Kudu test clusters with --block_manager=file
on Linux machines when keeping the data on a ZFS mount.
NOTE: file block manager shouldn't be used in production environments
Change-Id: I358214f4bc93fbf19bb245e3accc909943ae2f00
Reviewed-on: http://gerrit.cloudera.org:8080/21627
Reviewed-by: Yingchun Lai <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
---
src/kudu/fs/dir_util.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kudu/fs/dir_util.cc b/src/kudu/fs/dir_util.cc
index 206e5b59f..d6aebb9ac 100644
--- a/src/kudu/fs/dir_util.cc
+++ b/src/kudu/fs/dir_util.cc
@@ -249,7 +249,7 @@ Status DirInstanceMetadataFile::LoadFromDisk() {
uint64_t block_size;
RETURN_NOT_OK_FAIL_INSTANCE_PREPEND(env_->GetBlockSize(filename_,
&block_size),
Substitute("Failed to load metadata file. Could not get block size of
$0", filename_));
- if (pb->filesystem_block_size_bytes() != block_size) {
+ if (FsManager::IsLogType(dir_type_) && pb->filesystem_block_size_bytes() !=
block_size) {
return Status::IOError("Wrong filesystem block size", Substitute(
"Expected $0 but was $1", pb->filesystem_block_size_bytes(),
block_size));
}