You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by "acelyc111 (via GitHub)" <gi...@apache.org> on 2023/05/23 12:05:04 UTC

[GitHub] [incubator-pegasus] acelyc111 commented on a diff in pull request #1477: refactor: improve the single-responsibility of class fs_manager

acelyc111 commented on code in PR #1477:
URL: https://github.com/apache/incubator-pegasus/pull/1477#discussion_r1202182238


##########
src/replica/disk_cleaner.cpp:
##########
@@ -67,14 +68,14 @@ const std::string kFolderSuffixBak = ".bak";
 const std::string kFolderSuffixOri = ".ori";
 const std::string kFolderSuffixTmp = ".tmp";
 
-error_s disk_remove_useless_dirs(const std::vector<std::string> &data_dirs,
+error_s disk_remove_useless_dirs(const std::vector<std::shared_ptr<dir_node>> &dir_nodes,

Review Comment:
   I don't think it's necessary. If supporting to remove dir_node from fs manager, we have to make sure it's safe to access the dir_node in disk_remove_useless_dirs() even if it has been removed, std::shared_ptr is safe in this case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org