Skip to content
Snippets Groups Projects
  • Serge Petrenko's avatar
    031aea10
    box: ensure fiber processing box_cfg doesn't process messages from iproto · 031aea10
    Serge Petrenko authored
    In box_cfg() we have a call to gc_set_wal_watcher(), which creates pipes
    between 'wal' and 'tx' under the hood using cbus_pair().
    While pipes are being created, the fiber calling gc_set_wal_watcher()
    will process all the messages coming to 'tx' thread from iproto. This is
    wrong, since we have a separate fiber pool to handle iproto messages,
    and background fibers shouldn't participate in these messages
    processing. For example, this causes occasional credential corruption in
    the fiber executing box_cfg().
    
    Since tx fiber pool is already created at the time gc_set_wal_watcher()
    is called, we may forbid message processing for the fiber which calls
    the function, one of the tx fiber pool fibers will wake us up when the
    pipes are created.
    
    Closes #3779
    031aea10
    History
    box: ensure fiber processing box_cfg doesn't process messages from iproto
    Serge Petrenko authored
    In box_cfg() we have a call to gc_set_wal_watcher(), which creates pipes
    between 'wal' and 'tx' under the hood using cbus_pair().
    While pipes are being created, the fiber calling gc_set_wal_watcher()
    will process all the messages coming to 'tx' thread from iproto. This is
    wrong, since we have a separate fiber pool to handle iproto messages,
    and background fibers shouldn't participate in these messages
    processing. For example, this causes occasional credential corruption in
    the fiber executing box_cfg().
    
    Since tx fiber pool is already created at the time gc_set_wal_watcher()
    is called, we may forbid message processing for the fiber which calls
    the function, one of the tx fiber pool fibers will wake us up when the
    pipes are created.
    
    Closes #3779