If the write operation of the commit fails, we need to revert the graph in the store (in memory) as well.
|
resultingChanges, exception = graph.update(parsedQuery) |
|
if exception: |
|
# TODO need to revert or invalidate the graph at this point. |
|
pass |
|
oid = self.commit(graph, resultingChanges, 'New Commit from QuitStore', parent_commit_ref, |
|
target_ref, query=query, default_graph=default_graph, |
|
named_graph=named_graph) |
|
if exception: |
|
raise exception |
There needs to be a try … except block around the commit method, which would revert the update operation/invalidate the graph in case of an exception.
Somehow related to #191
If the write operation of the commit fails, we need to revert the graph in the store (in memory) as well.
QuitStore/quit/core.py
Lines 426 to 434 in 76f798b
There needs to be a try … except block around the commit method, which would revert the update operation/invalidate the graph in case of an exception.
Somehow related to #191