[ 
https://issues.apache.org/jira/browse/KUDU-3816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18128034#comment-18128034
 ] 

ASF subversion and git services commented on KUDU-3816:
-------------------------------------------------------

Commit a0409299d44318756156ca8760812b1fdfadf291 in kudu's branch 
refs/heads/master from Abhishek Chennaka
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=a0409299d ]

KUDU-3816 [consensus] Send the new leader's NO_OP without waiting for a 
heartbeat

A new leader now signals its peers when it appends its NO_OP. This will
ensure the the clean time is initialized and the tablet's replicas
serve the scans independent of --raft_heartbeat_interval_ms.

The regression test for KUDU-2147 has been updated according to the new 
behavior.

AdminCliTest.TestRebuildTables now rebuilds TestTable in add mode with
its actual replication factor of 3. With the default of 1 the master
evicts the extra replicas after the restart which this change makes
happen before the test sees all 3 replicas.

The repro.cc attached at KUDU_3747 doesn't show any latency with this patch
in place.

Change-Id: I1c1c4e448a1bf0142d32ee7e2721d304e444f9d8
Reviewed-on: http://gerrit.cloudera.org:8080/25101
Reviewed-by: Alexey Serbin <[email protected]>
Tested-by: Abhishek Chennaka <[email protected]>


> Newly elected Raft leader delayed initial heartbeat due to high 
> --raft_heartbeat_interval_ms causes scans on new tablets to be rejected.
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KUDU-3816
>                 URL: https://issues.apache.org/jira/browse/KUDU-3816
>             Project: Kudu
>          Issue Type: Improvement
>            Reporter: Abhishek Chennaka
>            Priority: Major
>
> After a replica becomes a leader {{RaftConsensus::BecomeLeaderUnlocked()}} 
> appends the NO_OP for the new term to its queue but doesn't send it right 
> away. 
> So the NO_OP only goes out with the first heartbeat to each follower which 
> has a wait time of utmost about {{{}--raft_heartbeat_interval_ms{}}}. Until 
> the NO_OP is committed, the MVCC clean time of a newly created tablet isn't 
> initialized, and every replica of that tablet rejects scans with:
> {noformat}
> Uninitialized: clean time has not yet been initialized (TABLET_NOT_RUNNING)
> {noformat}
> A write to the tablet hides the problem: {{Replicate()}} signals the peers, 
> and the NO_OP is sent together with the write. Only tablets that haven't been 
> written to since the election are affected.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to