The logs indicate the compaction process is scanning pages but skipping or failing to rewrite them, likely due to the pages being in use or locked (EBUSY). Compaction retries this process and may take significant time for large collections, especially if there’s ongoing activity. To ensure progress:

  1. Confirm the secondary is truly idle to minimize page contention.
  2. Monitor disk I/O and check if disk space changes after compaction completes.
  3. If progress stalls for extended periods, consider using resync from a primary to fully rebuild the secondary’s data files.
1 Like