service: update id map when inserting record

This commit is contained in:
c9s 2022-06-24 16:49:41 +08:00
parent 54d0a83eee
commit 4f42f90b49
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -129,6 +129,7 @@ func (sel SyncTask) execute(ctx context.Context, db *sqlx.DB, startTime time.Tim
}
}
ids[id] = struct{}{}
if sel.BatchInsert != nil {
if batchBufferRefVal.Len() > sel.BatchInsertBuffer-1 {
if sel.LogInsert {