Shubo-Peng opened a new issue, #176:
URL: https://github.com/apache/incubator-resilientdb/issues/176
Hi developers.
I'm trying to count in the `InternalConsensusCommit()` function in
**consensus_manager_pbft.cpp**, trying to force the system to trigger
ViewChange after a certain number of COMMITs have been processed.
I've tried having all the nodes run a `ForceViewChange()` function, which is
what the `MayStart()` function in viewchange_manager.cpp does after the
checkpoint timeout. But it failed because the view change messages are not
valid.
```
void ViewChangeManager::ForceViewChange() {
if (status_ == ViewChangeStatus::NONE) {
view_change_counter_ = 1;
} else if (status_ == ViewChangeStatus::READY_NEW_VIEW) {
// If the new view msg expires after receiving enough view
// messages, trigger a new primary.
view_change_counter_++;
}
// std::lock_guard<std::mutex> lk(status_mutex_);
if (ChangeStatue(ViewChangeStatus::READY_VIEW_CHANGE)) {
SendViewChangeMsg();
auto viewchange_timer = std::make_shared<ViewChangeTimeout>(
ViewChangeTimerType::TYPE_VIEWCHANGE, system_info_->GetCurrentView(),
config_.GetSelfInfo().id(), "null", GetCurrentTime(),
timeout_length_);
std::lock_guard<std::mutex> lk(vc_mutex_);
if (viewchange_timeout_min_heap_[config_.GetSelfInfo().id()].size() <
config_.GetMaxClientComplaintNum()) {
viewchange_timeout_min_heap_[config_.GetSelfInfo().id()].push(
viewchange_timer);
sem_post(&viewchange_timer_signal_);
}
}
}
```
Would you be able to assist me with this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]