Mike Percy has posted comments on this change.

Change subject: KUDU-2123. Auto-vivify cmeta on tombstoned replicas if doesn't 
exist at startup
......................................................................


Patch Set 6:

(6 comments)

> (7 comments)
 > 
 > I have the following question: why do we need to introduce that
 > additional state into ConsensusMetadata object? Why not to leave
 > the OVERWRITE/NO_OVERWRITE parameter for its Flush() method?

After discussing this with you offline, I agree that we can simplify the 
implementation and avoid this additional state. I'll back out this portion of 
the patch.

http://gerrit.cloudera.org:8080/#/c/7988/6/src/kudu/consensus/consensus_meta.cc
File src/kudu/consensus/consensus_meta.cc:

PS6, Line 334: /*overwrite_first_flush=*/ false
> Why not just to pass the NO_OVERWRITE flag to the Flush() method as it was 
The semantics I want to maintain are that we don't overwrite on the first 
Flush() call after create, but we overwrite at any other time.


http://gerrit.cloudera.org:8080/#/c/7988/6/src/kudu/consensus/consensus_meta_manager.cc
File src/kudu/consensus/consensus_meta_manager.cc:

Line 96:     return Create(tablet_id, config, initial_term, create_mode);
> Does it make sense to pass the cmeta_out here as well?
Fixed, added a unit test too.


http://gerrit.cloudera.org:8080/#/c/7988/6/src/kudu/tablet/tablet_replica-test.cc
File src/kudu/tablet/tablet_replica-test.cc:

PS6, Line 86: using consensus::ConsensusMetadataCreateMode;
> nit: is it needed?
Done


http://gerrit.cloudera.org:8080/#/c/7988/6/src/kudu/tserver/tablet_copy_source_session-test.cc
File src/kudu/tserver/tablet_copy_source_session-test.cc:

PS6, Line 91: using consensus::ConsensusMetadataCreateMode;
> nit: is it needed?
Done


http://gerrit.cloudera.org:8080/#/c/7988/6/src/kudu/tserver/ts_tablet_manager.cc
File src/kudu/tserver/ts_tablet_manager.cc:

PS6, Line 127: using consensus::ConsensusMetadataCreateMode;
> nit: is it needed?
This one is needed :)


PS6, Line 1093: scoped_refptr<ConsensusMetadata> cmeta;
> nit: it seems the 'cmeta' is not used in this scope; drop it, maybe?
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8ff6255b1fcbb12417b82853bcde9b239291492b
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to