Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/5240
to look at the new patch set (#21).
Change subject: WIP: KUDU-798 (part 5) Safe time advancement in the absense of
writes
......................................................................
WIP: KUDU-798 (part 5) Safe time advancement in the absense of writes
This plugs the new TimeManager through consensus and wherever else
it's needed and integrates with with transactions, tablet service
and consensus.
Noteworthy:
- Safe time advances as before _except_ in the absense of writes.
That is safe time is still advanced in Mvcc by the transaction
driver and only up to the committed transaction's timestamp.
When there are no writes to send the leader sends either its
current clock value (if there aren't any writes in-flight that
it doesn't know about yet) or the last safe timestamp.
- Mvcc's safe time is a more conservative version of "global"
safe time. Mvcc does not get updated with safe time heartbeats
from the leader. The clean snapshot must stay "clean" otherwise
a lot of things would break.
- Mvcc's WaitForCleanSnapshot() method was removed. There is no
longer a guarantee that the "clean" timestamp will move to
the present. It might not, in the absense of writes. This
patch introduces a new method that allows to wait for all
"known" transactions before a timestamp to be committed.
WIP as still missing a directed test but follow up patches
include integration tests (like an improved version of
linked_list-test that performs snapshot scans in the present)
that have been looped on dist-test.
This should be good to be reviewed.
Change-Id: I8532fdb069c8bee7f3e08ffe74cab0273885cc8e
---
M java/kudu-client/src/test/java/org/apache/kudu/client/TestHybridTime.java
M src/kudu/client/client-test.cc
M src/kudu/consensus/consensus.h
M src/kudu/consensus/consensus.proto
M src/kudu/consensus/consensus_peers-test.cc
M src/kudu/consensus/consensus_queue-test.cc
M src/kudu/consensus/consensus_queue.cc
M src/kudu/consensus/consensus_queue.h
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/consensus/raft_consensus_state.cc
M src/kudu/consensus/raft_consensus_state.h
M src/kudu/integration-tests/raft_consensus-itest.cc
M src/kudu/tablet/mvcc-test.cc
M src/kudu/tablet/mvcc.cc
M src/kudu/tablet/mvcc.h
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet_peer.cc
M src/kudu/tablet/tablet_peer.h
M src/kudu/tablet/transactions/alter_schema_transaction.cc
M src/kudu/tablet/transactions/transaction_driver.cc
M src/kudu/tablet/transactions/transaction_driver.h
M src/kudu/tablet/transactions/transaction_tracker-test.cc
M src/kudu/tablet/transactions/write_transaction.cc
M src/kudu/tablet/transactions/write_transaction.h
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tablet_service.h
28 files changed, 179 insertions(+), 139 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/40/5240/21
--
To view, visit http://gerrit.cloudera.org:8080/5240
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8532fdb069c8bee7f3e08ffe74cab0273885cc8e
Gerrit-PatchSet: 21
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <[email protected]>