Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16569 )

Change subject: KUDU-2612: persist commit MVCC op timestamp in txn metadata
......................................................................


Patch Set 1:

(1 comment)

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

http://gerrit.cloudera.org:8080/#/c/16569/1/src/kudu/tablet/tablet_metadata.cc@817
PS1, Line 817: if we are bootstrapping
> Wondering In which cases the mvcc op for a txn can be already persisted but
This happens when we are bootstrapping and replay a BEGIN_COMMIT op, since we 
have to replay WAL ops to rebuild in-memory state. Take this example:

BEGIN_TXN 1 (txn metadata is added in tablet metadata)
BEGIN_COMMIT 1 (op timestamp is updated in txn metadata)
FLUSH (txn metadata is persisted)
RESTART

In this scenario, after restarting, we see that we have an in-flight (not 
finalized or aborted) txn 1 persisted in metadata, so we create a new Txn 
object to indicate that there is an on-going Txn. Then we replay all ops for 
it, including the BEGIN_COMMIT op to get the participant's state to 
kCommitInProgress. But we don't need to anchor the WAL for this metadata flush 
because the metadata has already been persisted.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2400fbb7e96ddba78544a9549965fc095e32ca3
Gerrit-Change-Number: 16569
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <hao....@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 19 Oct 2020 20:41:30 +0000
Gerrit-HasComments: Yes

Reply via email to