frappe/frappe

Document: Deferred Insert

Open

#25,777 opened on Apr 2, 2024

 (11 comments) (1 reaction) (0 assignees)Python (2,942 forks)batch import
buggood first issue

Repository metrics

Stars
 (5,938 stars)
PR merge metrics
 (Avg merge 3d 3h) (582 merged PRs in 30d)

Description

  • save_to_db only dumps a maximum of 500 records per queue into the Database hourly.

    Restricting to 500 (arbitrary & very low number) leads to starvation when you're pushing records in higher volumes. We could easily just let the job flush as many records as it can instead?

  • Document creation is reset

    Since doc.insert is used within the deferred_insert API, the creation time is reset during DB insert. Essentially we end up re-writing the original information.

Contributor guide