song bruce zhang has posted comments on this change.

Change subject: kudu-1475 set is is_initialized_ to false in log pre-allocated 
case.
......................................................................


Patch Set 1:

> @todd, add  logic here maybe better , as it is in line with code
 > comments in ReadableLogSegment::ReadHeader . 
 > Of course modification you have described in slack will work too.
 > diff --git a/src/kudu/consensus/log_reader.cc 
 > b/src/kudu/consensus/log_reader.cc
 > index c7d001d..ab1af5a 100644
 > --- a/src/kudu/consensus/log_reader.cc
 > +++ b/src/kudu/consensus/log_reader.cc
 > @@ -147,6 +147,9 @@ Status LogReader::Init(const string&
 > tablet_wal_path) {
 > "Unable to open readable log segment");
 > DCHECK(segment);
 > CHECK(segment->IsInitialized()) << "Uninitialized segment at: " <<
 > segment->path();
 > +      if (!segment->HasHeader()) {
 > +        continue;
 > +      }
 > 
 > if (!segment->HasFooter()) {
 > LOG(INFO) << "Log segment " << fqp << " was likely left in-progress
 > "

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I45b2beb7c669b1821be8242f45fcea4c6ae269a0
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: song bruce zhang <zsyuyizh...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: song bruce zhang <zsyuyizh...@gmail.com>
Gerrit-HasComments: No

Reply via email to