Remove when the stored version is not higher, and remember the deletion so a later upsert at or below its version is ignored. Ids that do not exist are not an error.
OptionalversionsOptional; needed only by Migration.diff. One entry per id, in the
same order: the stored version and whether it is a tombstone, or null
for an id the store has never seen (or whose tombstone was purged).
The three things Argia needs from a vector database. Write the adapter for yours; Argia ships none.
Both writes must be conditional on version, atomically, or two writers can leave the two stores holding different copies of one document. In Postgres that is
INSERT ... ON CONFLICT (id) DO UPDATE ... WHERE stored.version <= excluded.version, with deletes kept as tombstone rows the same condition applies to and queries skip.Fis the filter yourqueryaccepts. Argia passes it through untouched, so when the two stores are different databases, give both adapters one filter shape and translate it inside each.