sophia: support direct compaction from in-memory index