revert part of [6573] to keep the speedup of metadata scanning