Yuqi Du has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/19463


Change subject: [tserver] keep the order of appling ops the same as raft wal
......................................................................

[tserver] keep the order of appling ops the same as raft wal

The order of tablet's write ops(including other raft logs) is an total order
in server-side. Apply them into kudu engine should be the same as raft wal.
But now apply ops by 'apply_pool->Submit' that's a concurrent threadpool,
may cause some ops out of order. For example, 4 logs of 2 ops, we expected:
    replicate 1.1
    commit 1.1
    replicate 1.2
    commit 1.2
or
    replicate 1.1
    replicate 1.2
    commit 1.1
    commit 1.2

A incorrect order is:
    replicate 1.1
    replicate 1.2
    commit 1.2
    commit 1.1

That means 1.2 would valid before 1.1  in kudu engine, that's not our expected.
'apply_pool->Submit' would cause the incorrect order.

This patch try to fix the problem by using apply_pool_token with SERIAL_MODE
created by apply_pool.

Change-Id: Id040122ab9473d1a8b03a2a1e751454a32b89d87
---
M src/kudu/tablet/ops/op_driver.cc
M src/kudu/tablet/ops/op_driver.h
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
4 files changed, 50 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/63/19463/1
--
To view, visit http://gerrit.cloudera.org:8080/19463
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id040122ab9473d1a8b03a2a1e751454a32b89d87
Gerrit-Change-Number: 19463
Gerrit-PatchSet: 1
Gerrit-Owner: Yuqi Du <[email protected]>

Reply via email to