Skip to content

Commit

Permalink
fix bug on duplicate key
Browse files Browse the repository at this point in the history
  • Loading branch information
jjh-kim committed Nov 17, 2024
1 parent 42b071f commit af8fa29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sbosc/worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ def bulk_import(self):
start_pk = self.get_start_pk(chunk_info)
if start_pk is None:
return
# If the start_pk is greater than the end_pk, set the last_pk_inserted to end_pk
# This can happen when chunk ended with a duplicate key error
elif start_pk > chunk_info.end_pk:
chunk_info.last_pk_inserted = chunk_info.end_pk

end_pk = chunk_info.end_pk
chunk_info.status = ChunkStatus.IN_PROGRESS
Expand Down

0 comments on commit af8fa29

Please sign in to comment.