Skip to content
Snippets Groups Projects
  1. Sep 16, 2016
    • Vladimir Davydov's avatar
      vinyl: do not free dropped indexes on sched stop · ed71319a
      Vladimir Davydov authored
      Currently, a dropped index might have compaction scheduled on scheduler
      stop, in which case its ranges are inter-linked and cannot be easily
      freed (dumb free of all ranges would result in double free). So let's
      drop the final index cleanup for now. We need to rework it anyway,
      because we never free active indexes on shutdown, although we should to
      make valgrind happy.
      ed71319a
    • Vladimir Davydov's avatar
      vinyl: rework range compaction · 993f410a
      Vladimir Davydov authored
      Currently, compaction works as follows:
       1. worker: write old range's runs and shadow indexes to disk, creating
          as many new ranges as necessary (min 1)
       2. tx: redistribute active memory index of the old range among new
          ranges
       3. tx: replace old range with new ones and delete old one
      
      Such a design has a serious drawback: redistribution (step #2) scales
      lineary with the number of tuples and hence may take too long.
      
      So this patch reworks the compact procedure. Now it looks like this:
       1. tx: create new ranges and insert them to the tree instead of the old
          range; in order not to break lookups, link mem and run of the old
          range to new ones
       2. worker: write mem and run of the old range to disk creating runs for
          each of new ranges
       3. tx: unlink old range's mem and run from new ranges and delete it
      
      An old range is either split in two parts by the median key
      (approximate) or not split at all, depending on its size.
      
      Note, we don't split a range if it hasn't been compacted at least once.
      This breaks assumptions of vinyl/split test, so I disable it for now. I
      will rework it later, perhaps after sanitizing the scheduler.
      
      Closes #1745
      993f410a
  2. Sep 15, 2016
  3. Sep 14, 2016
  4. Sep 13, 2016
  5. Sep 12, 2016
Loading