kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject kudu git commit: fs: fix cleanup after failure updating data dirs
Date Sat, 06 Jan 2018 01:16:46 GMT
Repository: kudu
Updated Branches:
  refs/heads/master bddbb34e2 -> 4f630d913


fs: fix cleanup after failure updating data dirs

The typo here meant that new fs instance files were not being deleted in the
event of an error during the data dir update process. This also prevented
new data dirs from being deleted too, since they weren't empty.

Change-Id: Ic4ec8dc913f9f6dee81a7404b0c0c25f738c9ff1
Reviewed-on: http://gerrit.cloudera.org:8080/8957
Reviewed-by: Andrew Wong <awong@cloudera.com>
Tested-by: Kudu Jenkins


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/4f630d91
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/4f630d91
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/4f630d91

Branch: refs/heads/master
Commit: 4f630d91318b02fd8820ca7ffafb8b6bc426dfe3
Parents: bddbb34
Author: Adar Dembo <adar@cloudera.com>
Authored: Fri Jan 5 16:24:55 2018 -0800
Committer: Adar Dembo <adar@cloudera.com>
Committed: Sat Jan 6 01:16:26 2018 +0000

----------------------------------------------------------------------
 src/kudu/fs/fs_manager.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/4f630d91/src/kudu/fs/fs_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/fs_manager.cc b/src/kudu/fs/fs_manager.cc
index 230ce71..9bbacb0 100644
--- a/src/kudu/fs/fs_manager.cc
+++ b/src/kudu/fs/fs_manager.cc
@@ -336,7 +336,7 @@ Status FsManager::Open(FsReport* report) {
   vector<string> created_files;
   auto deleter = MakeScopedCleanup([&]() {
     // Delete files first so that the directories will be empty when deleted.
-    for (const auto& f : created_dirs) {
+    for (const auto& f : created_files) {
       WARN_NOT_OK(env_->DeleteFile(f), "Could not delete file " + f);
     }
     // Delete directories in reverse order since parent directories will have


Mime
View raw message