Hello,
Since the v0.1.7 (v0.1.8 too) and better-sqlite3, we are facing (sometimes, 1% or less, I don't know exactly) to SQLITE_DONE exceptions when deleting rows in the vec table. I'm not able to create a small project where this problem appears, but maybe someone else encounters the same problem?!
Our table:
CREATE VIRTUAL TABLE IF NOT EXISTS embeddings USING vec0(
locale TEXT partition key,
scope TEXT,
documentId TEXT,
+chunkId TEXT,
+chunk TEXT,
embedding ${type}[${dimensions}] distance_metric=cosine
);
Query that producing sometimes these exception:
DELETE FROM embeddings
WHERE documentId = $documentId;
code=SQLITE_DONE: SqliteError: no more rows available
We must wrap the delete queries in a code like that:
try {
run();
} catch (ex) {
if (ex.code !== 'SQLITE_DONE') {
throw ex;
}
}
That looks very strange, SQLITE_DONE should never produce exception and it's very difficult to reproduce. It's a new problem because the same codebase with 0.1.7-alpha.2 is working as expected.
Regards,
Mathieu