Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

background space reclaim isn't working after DROP DATABASE #111

Closed
mdcallag opened this issue Sep 15, 2015 · 1 comment
Closed

background space reclaim isn't working after DROP DATABASE #111

mdcallag opened this issue Sep 15, 2015 · 1 comment
Assignees

Comments

@mdcallag
Copy link

My test loop ran 24 iterations and at the end of each iteration the database size is listed below. Each iteration is DROP DATABASE, create linkbench database and tables, linkbench load, linkbench run for 30 minutes. I used requesters=20 and maxid1=10M in the linkbench configuration. The database wasn't empty prior to the first iteration, so the size after one iteration was 46G and not something smaller.

46G /ssd1/scratch/data.mdcallag/data
51G /ssd1/scratch/data.mdcallag/data
55G /ssd1/scratch/data.mdcallag/data
59G /ssd1/scratch/data.mdcallag/data
63G /ssd1/scratch/data.mdcallag/data
68G /ssd1/scratch/data.mdcallag/data
72G /ssd1/scratch/data.mdcallag/data
76G /ssd1/scratch/data.mdcallag/data
81G /ssd1/scratch/data.mdcallag/data
85G /ssd1/scratch/data.mdcallag/data
89G /ssd1/scratch/data.mdcallag/data
93G /ssd1/scratch/data.mdcallag/data
97G /ssd1/scratch/data.mdcallag/data
102G /ssd1/scratch/data.mdcallag/data
106G /ssd1/scratch/data.mdcallag/data
110G /ssd1/scratch/data.mdcallag/data
114G /ssd1/scratch/data.mdcallag/data
119G /ssd1/scratch/data.mdcallag/data
123G /ssd1/scratch/data.mdcallag/data
126G /ssd1/scratch/data.mdcallag/data
130G /ssd1/scratch/data.mdcallag/data
134G /ssd1/scratch/data.mdcallag/data
138G /ssd1/scratch/data.mdcallag/data
142G /ssd1/scratch/data.mdcallag/data

@yoshinorim
Copy link

Here is my understanding about what is going on:

  • Created tables (and assigning index_ids in ascending order) and filled data. LinkBench created 4 index ids -- 256, 257, 258, 259.
  • Ran DROP DATABASE. They dropped all tables within the database. Index ids 256-259 were not immediately compacted. They were supposed to be compacted, when associated sst files were selected as compaction targets.
  • Created tables and filled data again. Created 4 index ids -- 260, 261, 262, 263.
  • Ran DROP DATABASE. They dropped all tables within the database. Index ids 260-263 were not immediately compacted. They were supposed to be compacted, when associated sst files were selected as compaction targets.
    ....

Dropped index ids are never reused by existing/future tables. This means, sst files, where dropped index ids are stored, are very unlikely to be selected as compaction targets.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants