Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

feat(dup): implement ship_mutation stage and mutation_batch #312

Merged
merged 9 commits into from
Sep 19, 2019

Conversation

neverchanje
Copy link
Contributor

@neverchanje neverchanje commented Sep 12, 2019

See the previous PR: #304.

ship_mutation

ship_mutation is a part of the duplication procedure:

while true
do
  load_mutations | ship_mutations
done

It tries to ship mutations to remote via mutation_duplicator.

mutation_batch

mutation_batch is internally a prepare_list to ensure the sequential order
of loaded mutations.

qinzuoyan
qinzuoyan previously approved these changes Sep 17, 2019
@hycdong
Copy link
Contributor

hycdong commented Sep 18, 2019

我对mutation_batch的功能还是有些疑问,mutation什么时候被加到热备的这个prepare_list里面的呢?是从private_log中load嘛?为什么还要对这个prepare_list进行prepare和commit呢?这个mutation_batch的用途我还是有些不明白

@neverchanje
Copy link
Contributor Author

我对mutation_batch的功能还是有些疑问,mutation什么时候被加到热备的这个prepare_list里面的呢?是从private_log中load嘛?为什么还要对这个prepare_list进行prepare和commit呢?这个mutation_batch的用途我还是有些不明白

是的,在 plog load 的时候用。

prepare/commit 是因为热备份需要保证最终一致性,所以发送方需要保证按照日志的顺序发,
不能随便发,这里就是利用 prepare list 保证顺序性。

mutation_batch is internally a prepare_list to ensure the sequential order of loaded mutations.

// A sorted array of committed mutations that are ready for duplication.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants