Closed jbruggem closed 11 years ago
The excption is well caugth. This is an error log. I think the comment explains the error inthe command but it should return error i agree.
Here is what happens:
Then the questions here are:
What is your view?
I'm not sure I grasp the exact consequences of what's happening internally, but it seems that any other solution than roll-back would lead to unpredictable behaviour for the client. If I understand correctly, in this situation we end up with:
So, if my assumptions are correct (they might not be), I see only two courses of actions:
Of course, offering both options to the client would also be a possibility ;-).
In any case from my point of view (as a client), when I send a single command I will tend to assume that an atomic operation is taking place behind the scenes, with a single result that I can predictably act upon.
I have implemented a security check that return an error in that case. In addition I have implemented rollback in case of problem during the transaction. Tested and validated.
When inserting a AS rule using the name of an already existing rule, the insertion is reported as successful to the BSON API client (it should be reported as failed).
Moreover, there's an unhandled SQL exception in the GCM's log.