You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2016/11/02 19:03:29 UTC

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

Todd Lipcon has uploaded a new change for review.

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

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................

Avoid extra fsyncs of tombstoned tablets during startup

At startup, we roll-forward the deletion of any tombstoned
tablets. This is often redundant if the tablet is already
fully deleted (i.e. no blocks and no orphaned blocks).
In that case, we can skip the expensive fsync to speed up
startup.

Before this patch, a server with a few thousand tombstoned
tablets took ~6 minutes to start up (about ~100ms per tablet).
After the patch, it only took 1 second.

Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
---
M src/kudu/tablet/tablet_metadata.cc
1 file changed, 8 insertions(+), 0 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

Posted by "Jean-Daniel Cryans (Code Review)" <ge...@cloudera.org>.
Jean-Daniel Cryans has submitted this change and it was merged.

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................


Avoid extra fsyncs of tombstoned tablets during startup

At startup, we roll-forward the deletion of any tombstoned tablets. This
is often redundant if the tablet is already fully deleted (i.e. no
blocks, no orphaned blocks, and no WAL). In that case, we can skip the
expensive fsync to speed up startup.

Before this patch, a server with a few thousand tombstoned tablets took
~6 minutes to start up (about ~100ms per tablet). After the patch, it
only took 1 second.

This patch also removes scary-looking 'WARNING' messages being printed
for every tombstoned tablet at startup.

Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Reviewed-on: http://gerrit.cloudera.org:8080/4915
Tested-by: Kudu Jenkins
Reviewed-by: Dinesh Bhat <di...@cloudera.com>
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>
---
M src/kudu/consensus/consensus_meta.cc
M src/kudu/consensus/log.cc
M src/kudu/consensus/log.h
M src/kudu/integration-tests/delete_table-test.cc
M src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
M src/kudu/integration-tests/external_mini_cluster_fs_inspector.h
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tserver/ts_tablet_manager.cc
9 files changed, 73 insertions(+), 10 deletions(-)

Approvals:
  Jean-Daniel Cryans: Looks good to me, approved
  Dinesh Bhat: Looks good to me, but someone else must approve
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

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

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4915/3/src/kudu/tablet/tablet_metadata.cc
File src/kudu/tablet/tablet_metadata.cc:

Line 173:       return Status::OK();
I wonder if we can narrow the 'skip-fsync' to tombstoned tablet bootstrap situation alone. i.e, could there be more situations where we may find the data state sync useful ?
1) Catalog_manager trying to tombstone the tablet because of a config change 
2) Tablet copy happening either on a healthy replica or tombstoned replica
3) ExternalMiniClusterFsInspector::CheckTabletDataStateOnTS called from a gtest right after it deleted an empty tablet (this is test anyways, so prolly not that significant)

Further, I don't know if it is a problematic situation or not, but it appears like we may have a window wherein we can have a superblock with healthy state, but without any Log and/or consensus-metadata. I guess as long as there is a path to clean them up later, it's probably okay to have that state, isn't it ?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

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

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

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

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

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................

Avoid extra fsyncs of tombstoned tablets during startup

At startup, we roll-forward the deletion of any tombstoned tablets. This
is often redundant if the tablet is already fully deleted (i.e. no
blocks, no orphaned blocks, and no WAL). In that case, we can skip the
expensive fsync to speed up startup.

Before this patch, a server with a few thousand tombstoned tablets took
~6 minutes to start up (about ~100ms per tablet). After the patch, it
only took 1 second.

This patch also removes scary-looking 'WARNING' messages being printed
for every tombstoned tablet at startup.

Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
---
M src/kudu/consensus/consensus_meta.cc
M src/kudu/consensus/log.cc
M src/kudu/consensus/log.h
M src/kudu/integration-tests/delete_table-test.cc
M src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
M src/kudu/integration-tests/external_mini_cluster_fs_inspector.h
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tserver/ts_tablet_manager.cc
9 files changed, 73 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/15/4915/5
-- 
To view, visit http://gerrit.cloudera.org:8080/4915
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

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

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4915/3/src/kudu/tablet/tablet_metadata.cc
File src/kudu/tablet/tablet_metadata.cc:

Line 173:       return Status::OK();
> OK, I reorganized the code a bit in the new revision of the patch: now we c
Perhaps I may be missing the entire picture here. Do we flush the tablet_data_state_ before we delete log/meta ? It appeared like with your patch earlier we were skipping tablet_data_state_ flush when a healthy but empty tablet was about to get tombstoned. If that's true, the situation I was describing was, suppose tserver receives a DeleteTablet rpc on a healthy but empty tablet (say due to a change_config triggered), then if the server crashes after it deletes the log/meta (but before we delete the superblock), then we can land up in that situation, no ? The situation being, a healthy superblock with no log/meta when tserver is coming up, not sure what state machine the tablet will go through at that point.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

Posted by "Jean-Daniel Cryans (Code Review)" <ge...@cloudera.org>.
Jean-Daniel Cryans has posted comments on this change.

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................


Patch Set 5: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

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

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................


Patch Set 2:

OK, added a test that just checks the mtime and makes sure the metadata doesn't get rewritten at startup. The test fails without the fix.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Jean-Daniel Cryans, Mike Percy, Kudu Jenkins,

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

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

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

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................

Avoid extra fsyncs of tombstoned tablets during startup

At startup, we roll-forward the deletion of any tombstoned
tablets. This is often redundant if the tablet is already
fully deleted (i.e. no blocks and no orphaned blocks).
In that case, we can skip the expensive fsync to speed up
startup.

Before this patch, a server with a few thousand tombstoned
tablets took ~6 minutes to start up (about ~100ms per tablet).
After the patch, it only took 1 second.

Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
---
M src/kudu/integration-tests/delete_table-test.cc
M src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
M src/kudu/integration-tests/external_mini_cluster_fs_inspector.h
M src/kudu/tablet/tablet_metadata.cc
4 files changed, 43 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/15/4915/3
-- 
To view, visit http://gerrit.cloudera.org:8080/4915
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

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

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................


Patch Set 5: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

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

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4915/3/src/kudu/tablet/tablet_metadata.cc
File src/kudu/tablet/tablet_metadata.cc:

Line 173:       return Status::OK();
> I wonder if we can narrow the 'skip-fsync' to tombstoned tablet bootstrap s
OK, I reorganized the code a bit in the new revision of the patch: now we check whether the tombstoning is a 'no-op' at a higher level, with the plus that we no longer log a WARN message per tombstoned tablet during startup.

Not entirely following what you mean by the bit about the superblock with no log -- that's only the case for a tombstoned tablet, right? What's the case you're talking about? We write the metadata to tombstoned before deleting the log/meta so I'm not sure how you could have a non-deleted metadata state with missing log.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

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

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................


Patch Set 1:

I'll figure out another way to test this

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

Posted by "Jean-Daniel Cryans (Code Review)" <ge...@cloudera.org>.
Jean-Daniel Cryans has posted comments on this change.

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4915/1/src/kudu/tablet/tablet_metadata.cc
File src/kudu/tablet/tablet_metadata.cc:

Line 169:     if (rowsets_.empty() &&
Worth putting this check in its own method? That way it can be externally tested, etc.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

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

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4915/3/src/kudu/tablet/tablet_metadata.cc
File src/kudu/tablet/tablet_metadata.cc:

Line 173:       return Status::OK();
> Perhaps I may be missing the entire picture here. Do we flush the tablet_da
> Do we flush the tablet_data_state_ before we delete log/meta?

Yes, TSTabletManager::DeleteTabletData() calls TabletMetadata::DeleteTabletData() (which flushes the state change) before it deletes the WALs.

> It appeared like with your patch earlier we were skipping tablet_data_state_ flush when a healthy but empty tablet was about to get tombstoned

No, it was only skipping the flush if the metadata was _already_ in the 'tombstoned' state, not in the case that it was transitioning from a normal state to a deleted one.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Jean-Daniel Cryans, Mike Percy, Kudu Jenkins,

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

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

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

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................

Avoid extra fsyncs of tombstoned tablets during startup

At startup, we roll-forward the deletion of any tombstoned
tablets. This is often redundant if the tablet is already
fully deleted (i.e. no blocks and no orphaned blocks).
In that case, we can skip the expensive fsync to speed up
startup.

Before this patch, a server with a few thousand tombstoned
tablets took ~6 minutes to start up (about ~100ms per tablet).
After the patch, it only took 1 second.

Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
---
M src/kudu/integration-tests/delete_table-test.cc
M src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
M src/kudu/integration-tests/external_mini_cluster_fs_inspector.h
M src/kudu/tablet/tablet_metadata.cc
4 files changed, 43 insertions(+), 5 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Avoid extra fsyncs of tombstoned tablets during startup

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

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

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

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

Change subject: Avoid extra fsyncs of tombstoned tablets during startup
......................................................................

Avoid extra fsyncs of tombstoned tablets during startup

At startup, we roll-forward the deletion of any tombstoned tablets. This
is often redundant if the tablet is already fully deleted (i.e. no
blocks, no orphaned blocks, and no WAL). In that case, we can skip the
expensive fsync to speed up startup.

Before this patch, a server with a few thousand tombstoned tablets took
~6 minutes to start up (about ~100ms per tablet). After the patch, it
only took 1 second.

This patch also removes scary-looking 'WARNING' messages being printed
for every tombstoned tablet at startup.

Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
---
M src/kudu/consensus/consensus_meta.cc
M src/kudu/consensus/log.cc
M src/kudu/consensus/log.h
M src/kudu/integration-tests/delete_table-test.cc
M src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
M src/kudu/integration-tests/external_mini_cluster_fs_inspector.h
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tserver/ts_tablet_manager.cc
9 files changed, 72 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/15/4915/4
-- 
To view, visit http://gerrit.cloudera.org:8080/4915
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I60cb184b8de2a6a381371ddcf2fb938a19757eec
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>