You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Adar Dembo (Code Review)" <ge...@cloudera.org> on 2017/05/10 02:55:44 UTC

[kudu-CR] fs manager: optimize tmp file deletion

Hello David Ribeiro Alves, Todd Lipcon,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/6837

to review the following change.

Change subject: fs_manager: optimize tmp file deletion
......................................................................

fs_manager: optimize tmp file deletion

In a run of dense_node-itest, the bulk of CPU time[1] was spent
canonicalizing paths while cleaning up temporary files. This patch optimizes
that in two ways:
- Stop canonicalizing paths. We already canonicalize the WAL and data dir
  roots; that's good enough for admin-provided symlinks.
- Split WAL and data root cleaning, parallelizing the latter through the
  DataDirManager.

1. Though admittedly the majority of wall clock time was waiting on IO.

Change-Id: I07830f0cc3fd5da847361607c62a369c39e677d2
---
M src/kudu/fs/data_dirs.cc
M src/kudu/fs/fs_manager.cc
M src/kudu/fs/fs_manager.h
M src/kudu/util/env_util.cc
M src/kudu/util/env_util.h
5 files changed, 73 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/37/6837/1
-- 
To view, visit http://gerrit.cloudera.org:8080/6837
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07830f0cc3fd5da847361607c62a369c39e677d2
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] fs manager: optimize tmp file deletion

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.

Change subject: fs_manager: optimize tmp file deletion
......................................................................


Patch Set 2: Verified+1

The Python tests failed because a master couldn't start due to an "address already in use" error.

-- 
To view, visit http://gerrit.cloudera.org:8080/6837
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I07830f0cc3fd5da847361607c62a369c39e677d2
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] fs manager: optimize tmp file deletion

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.

Change subject: fs_manager: optimize tmp file deletion
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/6837/1/src/kudu/fs/fs_manager.cc
File src/kudu/fs/fs_manager.cc:

PS1, Line 239: code:
             :   //
             :   //   Status s = fs_manager_->Open();
             :   //   if (s.IsNotFound()) {
             :   //     RETURN_NOT_OK(fs_manager_->CreateInitialFileSystemLayout());
             :   //     s = fs_manager_->Open();
             :   //   }
             :   //   RETURN_NOT_OK(s);
I think instead of putting this code snippet here, you could just say "minimize side effects in the case that the configured roots are not yet initialized"


-- 
To view, visit http://gerrit.cloudera.org:8080/6837
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I07830f0cc3fd5da847361607c62a369c39e677d2
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] fs manager: optimize tmp file deletion

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has submitted this change and it was merged.

Change subject: fs_manager: optimize tmp file deletion
......................................................................


fs_manager: optimize tmp file deletion

In a run of dense_node-itest, the bulk of CPU time[1] was spent
canonicalizing paths while cleaning up temporary files. This patch optimizes
that in two ways:
- Stop canonicalizing paths. We already canonicalize the WAL and data dir
  roots; that's good enough for admin-provided symlinks.
- Split WAL and data root cleaning, parallelizing the latter through the
  DataDirManager.

1. Though admittedly the majority of wall clock time was waiting on IO.

Change-Id: I07830f0cc3fd5da847361607c62a369c39e677d2
Reviewed-on: http://gerrit.cloudera.org:8080/6837
Reviewed-by: Todd Lipcon <to...@apache.org>
Tested-by: Adar Dembo <ad...@cloudera.com>
---
M src/kudu/fs/data_dirs.cc
M src/kudu/fs/fs_manager.cc
M src/kudu/fs/fs_manager.h
M src/kudu/util/env_util.cc
M src/kudu/util/env_util.h
5 files changed, 67 insertions(+), 57 deletions(-)

Approvals:
  Adar Dembo: Verified
  Todd Lipcon: Looks good to me, approved



-- 
To view, visit http://gerrit.cloudera.org:8080/6837
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I07830f0cc3fd5da847361607c62a369c39e677d2
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] fs manager: optimize tmp file deletion

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/6837

to look at the new patch set (#2).

Change subject: fs_manager: optimize tmp file deletion
......................................................................

fs_manager: optimize tmp file deletion

In a run of dense_node-itest, the bulk of CPU time[1] was spent
canonicalizing paths while cleaning up temporary files. This patch optimizes
that in two ways:
- Stop canonicalizing paths. We already canonicalize the WAL and data dir
  roots; that's good enough for admin-provided symlinks.
- Split WAL and data root cleaning, parallelizing the latter through the
  DataDirManager.

1. Though admittedly the majority of wall clock time was waiting on IO.

Change-Id: I07830f0cc3fd5da847361607c62a369c39e677d2
---
M src/kudu/fs/data_dirs.cc
M src/kudu/fs/fs_manager.cc
M src/kudu/fs/fs_manager.h
M src/kudu/util/env_util.cc
M src/kudu/util/env_util.h
5 files changed, 67 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/37/6837/2
-- 
To view, visit http://gerrit.cloudera.org:8080/6837
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I07830f0cc3fd5da847361607c62a369c39e677d2
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] fs manager: optimize tmp file deletion

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.

Change subject: fs_manager: optimize tmp file deletion
......................................................................


Patch Set 2: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/6837
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I07830f0cc3fd5da847361607c62a369c39e677d2
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] fs manager: optimize tmp file deletion

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.

Change subject: fs_manager: optimize tmp file deletion
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/6837/1/src/kudu/fs/fs_manager.cc
File src/kudu/fs/fs_manager.cc:

PS1, Line 239: code:
             :   //
             :   //   Status s = fs_manager_->Open();
             :   //   if (s.IsNotFound()) {
             :   //     RETURN_NOT_OK(fs_manager_->CreateInitialFileSystemLayout());
             :   //     s = fs_manager_->Open();
             :   //   }
             :   //   RETURN_NOT_OK(s);
> I think instead of putting this code snippet here, you could just say "mini
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/6837
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I07830f0cc3fd5da847361607c62a369c39e677d2
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes