Skip to content
  • Mauritz Sundell's avatar
    39c41826
    Bug#20575424 DATA RACE FOR NDBEVENTBUFFER::M_TOTAL_BUCKETS · 39c41826
    Mauritz Sundell authored
    Bug#20561446 NDB : NDBEVENTBUFFER NEEDS MORE THREADING PROTECTION
    
    Patch removes some sharing of data between threads, and also adds
    some thread synchronization.
    
    Application thread used "uninitialised" value of m_total_buckets as
    indicator when to use a dummy schema trans blocking add and drop
    nodes during subscribing to first event.  Now a new separate flag
    is used for that.
    
    Application thread was setting the inititial value for m_total_buckets
    while it only was receiver that need to use it, this logic was moved to
    receiver thread on SUB_START_CONF arrival.
    
    Also the m_active_op_count member was written by application thread but
    read by receiver, this was also moved to receiver on SUB_START_CONF,
    SUB_STOP_CONF, and SUB_STOP_REF arrival.  Also purging event data when
    all subscriptions was canceled was moved to happend immediately when it
    occured, instead of waiting until next new subscription.
    
    Synchronization was added around writing to m_ev_op.
    39c41826
    Bug#20575424 DATA RACE FOR NDBEVENTBUFFER::M_TOTAL_BUCKETS
    Mauritz Sundell authored
    Bug#20561446 NDB : NDBEVENTBUFFER NEEDS MORE THREADING PROTECTION
    
    Patch removes some sharing of data between threads, and also adds
    some thread synchronization.
    
    Application thread used "uninitialised" value of m_total_buckets as
    indicator when to use a dummy schema trans blocking add and drop
    nodes during subscribing to first event.  Now a new separate flag
    is used for that.
    
    Application thread was setting the inititial value for m_total_buckets
    while it only was receiver that need to use it, this logic was moved to
    receiver thread on SUB_START_CONF arrival.
    
    Also the m_active_op_count member was written by application thread but
    read by receiver, this was also moved to receiver on SUB_START_CONF,
    SUB_STOP_CONF, and SUB_STOP_REF arrival.  Also purging event data when
    all subscriptions was canceled was moved to happend immediately when it
    occured, instead of waiting until next new subscription.
    
    Synchronization was added around writing to m_ev_op.
Loading