Wang Xixu has posted comments on this change. ( http://gerrit.cloudera.org:8080/19327 )
Change subject: [Tool] KUDU-3318 Compact container metadata file manually ...................................................................... Patch Set 13: (4 comments) http://gerrit.cloudera.org:8080/#/c/19327/8/src/kudu/fs/log_block_manager.cc File src/kudu/fs/log_block_manager.cc: http://gerrit.cloudera.org:8080/#/c/19327/8/src/kudu/fs/log_block_manager.cc@552 PS8, Line 552: uint64_t* offset); > Describe what does 'total_blocks' mean as well, and it's helpful to mention Done http://gerrit.cloudera.org:8080/#/c/19327/8/src/kudu/fs/log_block_manager.cc@981 PS8, Line 981: if (!read_status.ok()) { > Should we update the offset only if no error occurs (EOF or Incomplete) ? Yes, offset is needs to be update at any time. 'offset' is used in the next operation 'merge' to know the delta record in the metadata file. http://gerrit.cloudera.org:8080/#/c/19327/8/src/kudu/fs/log_block_manager.cc@1369 PS8, Line 1369: > nit: remove it if not used. Done http://gerrit.cloudera.org:8080/#/c/19327/8/src/kudu/fs/log_block_manager.cc@2987 PS8, Line 2987: kMetadataCompactedFileSuffix); > Is there any reasons we must keep the functions as static? I guess you don' These functions are in log block manager. If using 'skip_block_manager = true', the block_manager is nullptr. We can not use to block_manager the call these functions. So it is better to make them static. These functions only read the metadata and handle the data. And it is no need to open block manager. -- To view, visit http://gerrit.cloudera.org:8080/19327 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id61cb6c88d7a093a8448e2497639f5c5c094efa4 Gerrit-Change-Number: 19327 Gerrit-PatchSet: 13 Gerrit-Owner: Wang Xixu <1450306...@qq.com> Gerrit-Reviewer: Attila Bukor <abu...@apache.org> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Wang Xixu <1450306...@qq.com> Gerrit-Reviewer: Yifan Zhang <chinazhangyi...@163.com> Gerrit-Reviewer: Yingchun Lai <laiyingc...@apache.org> Gerrit-Comment-Date: Wed, 28 Feb 2024 08:29:38 +0000 Gerrit-HasComments: Yes