ENG-4625: fix the bug related to table compaction.