Skip to content
Snippets Groups Projects
  • Vladislav Shpilevoy's avatar
    da4998ea
    raft: factor out the code to wakeup worker fiber · da4998ea
    Vladislav Shpilevoy authored
    Raft has a worker fiber to perform async tasks such as WAL write,
    state broadcast.
    
    The worker was created and woken up from 2 places, leading at
    least to code duplication. The patch wraps it into a new function
    raft_worker_wakeup(), and uses it.
    
    The patch is not need for anything functional, but was created
    while working on #5339 and trying ideas. The patch seems to be
    good refactoring making the code simpler, and therefore it is
    submitted.
    da4998ea
    History
    raft: factor out the code to wakeup worker fiber
    Vladislav Shpilevoy authored
    Raft has a worker fiber to perform async tasks such as WAL write,
    state broadcast.
    
    The worker was created and woken up from 2 places, leading at
    least to code duplication. The patch wraps it into a new function
    raft_worker_wakeup(), and uses it.
    
    The patch is not need for anything functional, but was created
    while working on #5339 and trying ideas. The patch seems to be
    good refactoring making the code simpler, and therefore it is
    submitted.