Fix a bug when doing realtime ingestion and remove log