fix record search condition when applying log