xapian-db: remove locks, transaction levels
Simplify xapian-db: locks should go elsewhere; transaction level add too much complication.
This commit is contained in:
@ -382,10 +382,12 @@ Store::remove_messages(const std::vector<Store::Id>& ids)
|
||||
{
|
||||
std::lock_guard guard{priv_->lock_};
|
||||
|
||||
XapianDb::Transaction tx (xapian_db()); // RAII
|
||||
xapian_db().request_transaction();
|
||||
|
||||
for (auto&& id : ids)
|
||||
xapian_db().delete_document(id);
|
||||
|
||||
xapian_db().request_commit(true/*force*/);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user