if indexer->commit() throws, the indexer gets destructed outside of a write lock