Do not commit updates, let the user do

This commit is contained in:
Clément Renault 2019-10-11 11:29:47 +02:00
parent 4b130fa2e5
commit 12b80e08be
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
6 changed files with 22 additions and 27 deletions

View file

@ -36,18 +36,16 @@ impl<D> DocumentsAddition<D> {
self.documents.push(document);
}
pub fn finalize(self, mut writer: rkv::Writer) -> MResult<u64>
pub fn finalize(self, writer: &mut rkv::Writer) -> MResult<u64>
where D: serde::Serialize
{
let _ = self.updates_notifier.send(());
let update_id = push_documents_addition(
&mut writer,
writer,
self.updates_store,
self.updates_results_store,
self.documents,
)?;
writer.commit()?;
let _ = self.updates_notifier.send(());
Ok(update_id)
}
}