[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-22 Thread Mike Percy (Code Review)
Mike Percy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8605 )

Change subject: tablet: mark delta tracker read-only on error
..


Patch Set 10: Code-Review+2

It's a little gross but this is what we get for exposing locks across 
components :) lgtm


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 10
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Thu, 23 Nov 2017 00:17:25 +
Gerrit-HasComments: No


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-22 Thread Andrew Wong (Code Review)
Hello Mike Percy, Kudu Jenkins, Todd Lipcon,

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

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

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

Change subject: tablet: mark delta tracker read-only on error
..

tablet: mark delta tracker read-only on error

When DeltaTracker::Flush() fails, it leaves a DeltaMemStore in the redo
store list. This is fine for reads because the readpath expects any
DeltaStore to be in that slot, but this is a problem for updates, which
expect only DeltaFileReaders in the list while the compact_flush_lock_
is held.

Before, we would get around this by CHECKing so Flush() could never
return in such a state. This patch introduces a flag to the
DeltaTracker that indicates whether it has experienced such an error.
In order to ensure type-correctness, this flag must be checked
immediately upon entering the critical section of the
compact_flush_lock_.

Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
---
M src/kudu/tablet/delta_tracker.cc
M src/kudu/tablet/delta_tracker.h
M src/kudu/tablet/diskrowset.cc
3 files changed, 36 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/05/8605/10
--
To view, visit http://gerrit.cloudera.org:8080/8605
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 10
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-22 Thread Mike Percy (Code Review)
Mike Percy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8605 )

Change subject: tablet: mark delta tracker read-only on error
..


Patch Set 9: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 9
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Wed, 22 Nov 2017 20:16:46 +
Gerrit-HasComments: No


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-21 Thread Andrew Wong (Code Review)
Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8605 )

Change subject: tablet: mark delta tracker read-only on error
..


Patch Set 9: Code-Review+2

Carrying forward Mike's +2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 9
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Wed, 22 Nov 2017 06:42:31 +
Gerrit-HasComments: No


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-21 Thread Mike Percy (Code Review)
Mike Percy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8605 )

Change subject: tablet: mark delta tracker read-only on error
..


Patch Set 8: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 8
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Wed, 22 Nov 2017 05:25:55 +
Gerrit-HasComments: No


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-21 Thread Mike Percy (Code Review)
Mike Percy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8605 )

Change subject: tablet: mark delta tracker read-only on error
..


Patch Set 7: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 7
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Tue, 21 Nov 2017 22:38:29 +
Gerrit-HasComments: No


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-21 Thread Andrew Wong (Code Review)
Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8605 )

Change subject: tablet: mark delta tracker read-only on error
..


Patch Set 7:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/8605/6/src/kudu/tablet/delta_tracker.cc
File src/kudu/tablet/delta_tracker.cc:

http://gerrit.cloudera.org:8080/#/c/8605/6/src/kudu/tablet/delta_tracker.cc@355
PS6, Line 355: CheckWritableUnlocked(
> nit: perhaps rename to CheckWritableUnlocked()
Done


http://gerrit.cloudera.org:8080/#/c/8605/6/src/kudu/tablet/delta_tracker.cc@740
PS6, Line 740: read_only_ = true;
> CHECK(s.IsDiskFailure()) << LogPrefix() << s.ToString();
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 7
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Tue, 21 Nov 2017 22:31:10 +
Gerrit-HasComments: Yes


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-21 Thread Andrew Wong (Code Review)
Hello Mike Percy, Kudu Jenkins, Todd Lipcon,

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

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

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

Change subject: tablet: mark delta tracker read-only on error
..

tablet: mark delta tracker read-only on error

When DeltaTracker::Flush() fails, it leaves a DeltaMemStore in the redo
store list. This is fine for reads because the readpath expects any
DeltaStore to be in that slot, but this is a problem for updates, which
expect only DeltaFileReaders in the list while the compact_flush_lock_
is held.

Before, we would get around this by CHECKing so Flush() could never
return in such a state. This patch introduces a flag to the
DeltaTracker that indicates whether it has experienced such an error.
In order to ensure type-correctness, this flag must be checked
immediately upon entering the critical section of the
compact_flush_lock_.

Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
---
M src/kudu/tablet/delta_tracker.cc
M src/kudu/tablet/delta_tracker.h
2 files changed, 35 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/05/8605/7
--
To view, visit http://gerrit.cloudera.org:8080/8605
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 7
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-21 Thread Mike Percy (Code Review)
Mike Percy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8605 )

Change subject: tablet: mark delta tracker read-only on error
..


Patch Set 6:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8605/6/src/kudu/tablet/delta_tracker.cc
File src/kudu/tablet/delta_tracker.cc:

http://gerrit.cloudera.org:8080/#/c/8605/6/src/kudu/tablet/delta_tracker.cc@740
PS6, Line 740: CHECK(s.IsDiskFailure());
CHECK(s.IsDiskFailure()) << LogPrefix() << s.ToString();

Otherwise this could be pretty frustrating to debug in the field.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 6
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Tue, 21 Nov 2017 20:14:37 +
Gerrit-HasComments: Yes


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-21 Thread Mike Percy (Code Review)
Mike Percy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8605 )

Change subject: tablet: mark delta tracker read-only on error
..


Patch Set 6:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8605/6/src/kudu/tablet/delta_tracker.cc
File src/kudu/tablet/delta_tracker.cc:

http://gerrit.cloudera.org:8080/#/c/8605/6/src/kudu/tablet/delta_tracker.cc@355
PS6, Line 355: ReadOnlyStatusUnlocked
nit: perhaps rename to CheckWritableUnlocked()



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 6
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Tue, 21 Nov 2017 20:13:00 +
Gerrit-HasComments: Yes


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-21 Thread Andrew Wong (Code Review)
Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8605 )

Change subject: tablet: mark delta tracker read-only on error
..


Patch Set 6:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.h
File src/kudu/tablet/delta_tracker.h:

http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.h@362
PS5, Line 362:   // Exclusive lock that ensures that only one flush o
> I think we'll forget what this means. Maybe we should just say that errors
Done


http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.h@363
PS5, Line 363:   // at a time. Protects redo_delta_stores_ and 
undo_delta_stores_.
> do we need a full status here? This will take 8 bytes up in the object size
Done


http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.cc
File src/kudu/tablet/delta_tracker.cc:

http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.cc@726
PS5, Line 726:
> do we still want to FATAL in the case of a non-disk-error here? otherwise i
Yeah, makes sense, we wouldn't want a maintenance-thread-hog.


http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.cc@730
PS5, Line 730:
> LOG_WITH_PREFIX
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 6
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Tue, 21 Nov 2017 09:25:07 +
Gerrit-HasComments: Yes


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-21 Thread Andrew Wong (Code Review)
Hello Mike Percy, Kudu Jenkins, Todd Lipcon,

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

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

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

Change subject: tablet: mark delta tracker read-only on error
..

tablet: mark delta tracker read-only on error

When DeltaTracker::Flush() fails, it leaves a DeltaMemStore in the redo
store list. This is fine for reads because the readpath expects any
DeltaStore to be in that slot, but this is a problem for updates, which
expect only DeltaFileReaders in the list while the compact_flush_lock_
is held.

Before, we would get around this by CHECKing so Flush() could never
return in such a state. This patch introduces a flag to the
DeltaTracker that indicates whether it has experienced such an error.
In order to ensure type-correctness, this flag must be checked
immediately upon entering the critical section of the
compact_flush_lock_.

Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
---
M src/kudu/tablet/delta_tracker.cc
M src/kudu/tablet/delta_tracker.h
2 files changed, 36 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/05/8605/6
--
To view, visit http://gerrit.cloudera.org:8080/8605
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 6
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-20 Thread Todd Lipcon (Code Review)
Todd Lipcon has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8605 )

Change subject: tablet: mark delta tracker read-only on error
..


Patch Set 5:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.h
File src/kudu/tablet/delta_tracker.h:

http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.h@362
PS5, Line 362:   // ensure type-correctness of the delta store lists.
I think we'll forget what this means. Maybe we should just say that errors may 
leave the internal state such that future maintenance ops would not be safe to 
run, and leave out the specifics.


http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.h@363
PS5, Line 363:   Status read_only_status_;
do we need a full status here? This will take 8 bytes up in the object size. Is 
a bool sufficient? If so, if we order it next to one of the existing bools, it 
should pack into existing free padding without increasing the overall struct 
size.


http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.cc
File src/kudu/tablet/delta_tracker.cc:

http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.cc@726
PS5, Line 726:   if (PREDICT_FALSE(!s.ok())) {
do we still want to FATAL in the case of a non-disk-error here? otherwise it's 
possible that we'd have some bug that would just mark a deltatracker read-only, 
but not actually mark the tablet failed, and then we'd be "stuck" with this DMS 
occupying memory but being unflushable



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 5
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Comment-Date: Tue, 21 Nov 2017 06:01:30 +
Gerrit-HasComments: Yes


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-20 Thread Mike Percy (Code Review)
Mike Percy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8605 )

Change subject: tablet: mark delta tracker read-only on error
..


Patch Set 5:

(1 comment)

lgtm, could use a test

http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.cc
File src/kudu/tablet/delta_tracker.cc:

http://gerrit.cloudera.org:8080/#/c/8605/5/src/kudu/tablet/delta_tracker.cc@730
PS5, Line 730: LOG
LOG_WITH_PREFIX



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 5
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy 
Gerrit-Comment-Date: Tue, 21 Nov 2017 04:57:35 +
Gerrit-HasComments: Yes


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-20 Thread Andrew Wong (Code Review)
Hello Kudu Jenkins,

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

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

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

Change subject: tablet: mark delta tracker read-only on error
..

tablet: mark delta tracker read-only on error

When DeltaTracker::Flush() fails, it leaves a DeltaMemStore in the redo
store list. This is fine for reads because the readpath expects any
DeltaStore to be in that slot, but this is a problem for updates, which
expect only DeltaFileReaders in the list while the compact_flush_lock_
is held.

Before, we would get around this by CHECKing so Flush() could never
return in such a state. This patch introduces a Status to the
DeltaTracker that indicates whether it has experienced such an error.
In order to ensure type-correctness, this Status must be checked
immediately upon entering the critical section of the
compact_flush_lock_.

Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
---
M src/kudu/tablet/delta_tracker.cc
M src/kudu/tablet/delta_tracker.h
2 files changed, 21 insertions(+), 5 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 4
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-20 Thread Andrew Wong (Code Review)
Hello Kudu Jenkins,

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

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

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

Change subject: tablet: mark delta tracker read-only on error
..

tablet: mark delta tracker read-only on error

When DeltaTracker::Flush() fails, it leaves a DeltaMemStore in the redo
store list. This is fine for reads because the readpath expects any
DeltaStore to be in that slot, but this is a problem for updates, which
expect only DeltaFileReaders in the list while the compact_flush_lock_
is held.

Before, we would get around this by CHECKing so Flush() could never
return in such a state. This patch introduces a Status to the
DeltaTracker that indicates whether it has experienced such an error.
In order to ensure type-correctness, this Status must be checked
immediately upon entering the critical section of the
compact_flush_lock_.

Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
---
M src/kudu/tablet/delta_tracker.cc
M src/kudu/tablet/delta_tracker.h
2 files changed, 21 insertions(+), 5 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins


[kudu-CR] tablet: mark delta tracker read-only on error

2017-11-20 Thread Andrew Wong (Code Review)
Andrew Wong has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/8605


Change subject: tablet: mark delta tracker read-only on error
..

tablet: mark delta tracker read-only on error

When DeltaTracker::Flush() fails, it leaves a DeltaMemStore in the redo
store list. This is fine for reads because the readpath expects any
DeltaStore to be in that slot, but this is a problem for updates, which
expect only DeltaFileReaders in the list while the compact_flush_lock_
is held.

Before, we would get around this by CHECKing so Flush() could never
return in such a state. This patch introduces a Status to the
DeltaTracker that indicates whether it has experienced such an error.
In order to ensure type-correctness, this Status must be checked
immediately upon entering the critical section of the
compact_flush_lock_.

Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
---
M src/kudu/tablet/delta_tracker.cc
M src/kudu/tablet/delta_tracker.h
2 files changed, 20 insertions(+), 5 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib950048e9cd0929a10714ab1cc2bd829835afced
Gerrit-Change-Number: 8605
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong