You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2019/12/09 04:16:02 UTC

[kudu] 02/05: fs: mark 'filesystem_block_size_bytes' optional

This is an automated email from the ASF dual-hosted git repository.

adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit e5ab399e0f2545214d9fdc6f6c04a67540a9aadc
Author: Andrew Wong <aw...@apache.org>
AuthorDate: Thu Dec 5 00:28:14 2019 -0800

    fs: mark 'filesystem_block_size_bytes' optional
    
    While the field is useful when dealing with data directories, if we want
    to reuse the path instance files for WAL directories, the field won't
    always be necessary. As such, this marks it 'optional' instead of
    'required'.
    
    Is this safe? While not strictly backwards compatible as far as protobuf
    goes, I'm assuming that the DataDirManager will continue to use the now
    optional field. Taken in that context, the switch to optional shouldn't
    pose backwards compatibility issues for older clusters. While I can't
    guarantee that, I've at least added a comment indicating the appropriate
    usage of the field.
    
    Change-Id: I5378391a94e5faa54a11a277d9191d151e0225d5
    Reviewed-on: http://gerrit.cloudera.org:8080/14856
    Tested-by: Kudu Jenkins
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
---
 src/kudu/fs/fs.proto | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/kudu/fs/fs.proto b/src/kudu/fs/fs.proto
index 241187e..3292240 100644
--- a/src/kudu/fs/fs.proto
+++ b/src/kudu/fs/fs.proto
@@ -68,7 +68,8 @@ message PathInstanceMetadataPB {
   // Block size on the filesystem where this instance was created. If the
   // instance (and its data) are ever copied to another location, the block
   // size in that location must be the same.
-  required uint64 filesystem_block_size_bytes = 3;
+  // This must be present if this instance belongs to a data directory.
+  optional uint64 filesystem_block_size_bytes = 3;
 }
 
 message BlockIdPB {