Implement remote transactions in gremlin-server#3328
Conversation
4951565 to
32b9653
Compare
The HttpGremlinEndpointHandler is updated to handle transactional workloads which it does in conjunction with the newly added TransactionManager. The Transactionmanager is used for managing lifecycle and it will return an UnmanagedTransaction for use to submit ThreadLocal-based Graph transactions.
32b9653 to
534465e
Compare
| logger.warn("Timeout waiting for boss/worker thread pools to shutdown - continuing with shutdown process."); | ||
| } | ||
|
|
||
| if (serverGremlinExecutor != null) { |
There was a problem hiding this comment.
Nit: can this be folded into the if-statement below
There was a problem hiding this comment.
This is actually intentional. If you look at the whole file, its broken out into parts to make the cleanup code easier to see.
| assertTrue(r.getStatusLine().getStatusCode() == 404 || r.getStatusLine().getStatusCode() == 400); | ||
| final String msg = extractStatusMessage(r); | ||
| assertTrue(msg.contains("Begin transaction request cannot have a user-supplied transactionId") || | ||
| msg.contains("Transaction not found")); |
There was a problem hiding this comment.
Out of curiosity, what are the conditions which lead to the "Transaction not found" response? The "Begin transaction request cannot have a user-supplied transactionId" message is much clearer.
There was a problem hiding this comment.
Based on my memory, this depends on whether the transaction ID is actually valid. If it was nonsense (never existed in the TransactionManager), you'll get the "Transaction not found". If it is valid and open then you'll get the "begin transaction ..."
The HttpGremlinEndpointHandler is updated to handle transactional
workloads which it does in conjunction with the newly added
TransactionManager. The Transactionmanager is used for managing
lifecycle and it will return an UnmanagedTransaction for use to submit
ThreadLocal-based Graph transactions.
VOTE +1