baidu / braft

An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.
Apache License 2.0
3.95k stars 881 forks source link

on_apply 一批task的数量是怎么控制的 #274

Open LittleTigered opened 3 years ago

LittleTigered commented 3 years ago

void on_apply(braft::Iterator &iter) { for (; iter.valid(); iter.next()) { } }

braft里面每次调用on_apply, iterator中的task数量是怎么控制的呢

walterzhaoJR commented 2 years ago

you can check the following code image @LittleTigered