Alexey Serbin 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 14:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/17725/14/src/kudu/server/server_base.cc
File src/kudu/server/server_base.cc:

http://gerrit.cloudera.org:8080/#/c/17725/14/src/kudu/server/server_base.cc@919
PS14, Line 919: wal_dir_available_space_
> I was going to point out that we need to take the lock before returning thi
+1

It would be consistent to update the internals in 
Refresh{Data,Wal}DirAvailableSpaceIfExpired(), and return the result.


http://gerrit.cloudera.org:8080/#/c/17725/14/src/kudu/server/server_base.cc@953
PS14, Line 953:   MonoTime expiry = wal_dir_space_last_check_ + 
MonoDelta::FromSeconds(
              :           FLAGS_fs_wal_dir_available_space_cache_seconds);
> We also need to hold the lock here. Consider early returning when possible
Alternatively, it's possible to make wal_dir_space_last_check_ and 
wal_dir_available_space_ atomic.  Then you could use compare_exchange to set 
wal_dir_space_last_check_ and wal_dir_available_space_, making sure only the 
very last update is kept :)

Same for data_dirs_space_last_check_ and data_dirs_available_space_.



--
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: 14
Gerrit-Owner: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Thu, 26 Aug 2021 23:50:02 +0000
Gerrit-HasComments: Yes

Reply via email to