main: check the id read by from wal.