Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/17725 )
Change subject: KUDU-3204: Add a metric for amount of available space ...................................................................... Patch Set 2: (3 comments) http://gerrit.cloudera.org:8080/#/c/17725/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/17725/2//COMMIT_MSG@10 PS2, Line 10: wal_dir_space_available_bytes - Exposes the free space available in the nit: can you make these bullet points for better readability? ("-" or "*") http://gerrit.cloudera.org:8080/#/c/17725/2/src/kudu/server/server_base.cc File src/kudu/server/server_base.cc: http://gerrit.cloudera.org:8080/#/c/17725/2/src/kudu/server/server_base.cc@446 PS2, Line 446: total_free_space += > There might be dragons here: what if (space_info_datadir.free_bytes - FLAGS One more dragon I can think of: if (space_info_datadir.free_bytes - FLAGS_fs_data_dirs_reserved_bytes) is negative for any of the dirs, total_free_space will be less than the real total free space. http://gerrit.cloudera.org:8080/#/c/17725/2/src/kudu/server/server_base.cc@446 PS2, Line 446: total_free_space += space_info_datadir.free_bytes - FLAGS_fs_data_dirs_reserved_bytes; maybe this could be refactored so that both GetDataDirAvailableSpace and GetWalDirAvailable space use the same function to get the available space in a single directory. -- To view, visit http://gerrit.cloudera.org:8080/17725 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I58a7419847d080498aaf431d1dab098e1af71ad0 Gerrit-Change-Number: 17725 Gerrit-PatchSet: 2 Gerrit-Owner: Abhishek Chennaka <achenn...@cloudera.com> Gerrit-Reviewer: Abhishek Chennaka <achenn...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Attila Bukor <abu...@apache.org> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Comment-Date: Wed, 28 Jul 2021 11:44:52 +0000 Gerrit-HasComments: Yes