[Tarantool-patches] [PATCH 2/6] raft: factor out the code to wakeup worker fiber

Cyrill Gorcunov gorcunov at gmail.com
Thu Oct 15 09:50:03 MSK 2020


On Thu, Oct 15, 2020 at 12:40:36AM +0200, Vladislav Shpilevoy wrote:
> >> -	raft.is_broadcast_scheduled = true;
> >> +	if (raft.worker == NULL) {
> >> +		raft.worker = fiber_new("raft_worker", raft_worker_f);
> >> +		fiber_set_joinable(raft.worker, true);
> >> +	}
> > 
> > When fiber_new return NULL you'll get nil dereference in fiber_set_joinable.
> 
> Indeed, you are right! It seems it was there always. There is no a
> beautiful way to fix it now, so I added a panic() here in case of OOM:

Sure, thanks!


More information about the Tarantool-patches mailing list