This PR fixes a bug that happens when attempting to insert a new vector record to the collection but the collection can't find the first valid vector ID to start the insert operation.
Testing
[x] I have tested this PR locally.
[x] I added tests to cover my changes, if not applicable, I have added a reason why.
The script below will reproduce the issue with the previous version:
use oasysdb::prelude::*;
fn main() {
let config = Config::default();
let mut collection = Collection::new(&config);
let record = Record::many_random(1536, 2);
// Insert and delete a record
collection.insert(&record[0]).unwrap();
collection.delete(&VectorID(0)).unwrap();
// Insert another record
collection.insert(&record[1]).unwrap();
}
Chore checklist
[x] I have updated the documentation accordingly.
[x] I have added comments to most of my code, particularly in hard-to-understand areas.
Purpose
This PR fixes a bug that happens when attempting to insert a new vector record to the collection but the collection can't find the first valid vector ID to start the insert operation.
Testing
The script below will reproduce the issue with the previous version:
Chore checklist