Implement auto-compaction#2