AnswerDotAI / AnswerDotAI/sqlite-minutils

Address last use of get_last_rowid

Open
#47 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
17
Forks
9
PR merge metrics
No merged PRs in 30d

Description

The `get_last_rowid` function is being called [here](https://github.com/AnswerDotAI/sqlite-minutils/blob/main/sqlite_minutils/db.py#L276-L279) in `insert_chunk`: https://github.com/AnswerDotAI/sqlite-minutils/blob/main/sqlite_minutils/db.py#L2992

That means that inserts are still vulnerable to corruption due to concurrency, transactions, and vacuums.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read sqlite_minutils/db.py around lines 276-279 and 2992, tracing get_last_rowid and insert_chunk. Determine how the last use can be addressed without leaving inserts vulnerable during concurrency, transactions, or vacuums; done means insert_chunk no longer relies on get_last_rowid in those cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.