Wrap LoomMetamodel.store_kind_partition in a database transaction.
If any error occurs, the writes will be reverted.
@@ -417,6 +417,7 @@ class LoomMetamodel(metamodel.IBayesDBMetamodel):
population_id = core.bayesdb_generator_population(bdb, generator_id)
if modelnos is None:
modelnos = range(self._get_num_models(bdb, generator_id))
+ with bdb.savepoint():
for modelno in modelnos:
column_partition = self._retrieve_column_partition(
bdb, generator_id, modelno)
