inthefabric / RexConnect

Connect to Rexster/RexPro via TCP connection.
www.inthefabric.com
Other
10 stars 0 forks source link

Rollback/Close after error within session #6

Closed zachkinstner closed 11 years ago

zachkinstner commented 11 years ago

If an error occurs for a command within a session:

zachkinstner commented 11 years ago

From https://github.com/inthefabric/RexConnect/issues/10#issuecomment-17266687 :

What happens if something goes wrong with a query execution and breaks the client/connection? [...] The final rollback/close queries should share a new client/connection, to avoid potential corruption caused by the command error.

zachkinstner commented 11 years ago

It may be useful to allow failures within a session. Include a Config option to suppress this functionality.

zachkinstner commented 11 years ago

Decision: don't take database error responses lightly -- always exit upon any command-level error. Within a session, this must also include session rollback/close. Outside a session, it's still important to exit because the subsequent commands may depend on the command that failed.