• unknown's avatar
    WL#3072 Maria Recovery. · 1cc48d16
    unknown authored
    Updates to the bitmap flush/pin logic to prepare for when we support
    multiple writers.
    
    
    storage/maria/ma_bitmap.c:
      Read lock is less bad than write lock.
      Changing bitmap->flushable to a counter, to prepare for when multiple
      writers are allowed on a table.
      Using bitmap->flush_all_requested instead of share->in_checkpoint; the
      latter can be true for the time of a whole checkpoint even though
      the checkpoint is not yet handling our table, or has already handled it,
      so to decrease the number of broadcasts we use a dedicated my_bool
      which is true only when checkpoint is handling this table's bitmap.
      _ma_bitmap_flushable(share,+1) waits for a concurrent _ma_bitmap_flush_all()
      to finish before incrementing non_flushable; without this, with multiple
      writers there may always be one thread making the bitmap unflushable
      and thus checkpoint would stall.
    storage/maria/ma_blockrec.c:
      update to new prototype: "flushable is FALSE|TRUE" becomes "add 1|-1 to
      non_flushable".
    storage/maria/ma_blockrec.h:
      new prototype
    storage/maria/maria_def.h:
      MARIA_FILE_BITMAP::flushable becomes a counter.
      New MARIA_FILE_BITMAP::flush_all_requested.
    1cc48d16
ma_blockrec.h 11.1 KB