Fix 2PC with concurrent memtable insert
Summary: If concurrent memtable insert is enabled, and one prepare command and a normal command are grouped into a commit group, the sequence ID will be calculated incorrectly. Closes https://github.com/facebook/rocksdb/pull/1730 Differential Revision: D4371081 Pulled By: siying fbshipit-source-id: cd40c6d
This commit is contained in:
parent
53571a7a70
commit
b642e94c88
@ -317,7 +317,7 @@ void WriteThread::LaunchParallelFollowers(ParallelGroup* pg,
|
|||||||
|
|
||||||
while (w != pg->last_writer) {
|
while (w != pg->last_writer) {
|
||||||
// Writers that won't write don't get sequence allotment
|
// Writers that won't write don't get sequence allotment
|
||||||
if (!w->CallbackFailed()) {
|
if (!w->CallbackFailed() && w->ShouldWriteToMemtable()) {
|
||||||
sequence += WriteBatchInternal::Count(w->batch);
|
sequence += WriteBatchInternal::Count(w->batch);
|
||||||
}
|
}
|
||||||
w = w->link_newer;
|
w = w->link_newer;
|
||||||
|
Loading…
Reference in New Issue
Block a user