Skip to content

Implement remote transactions in gremlin-server#3328

Open
kenhuuu wants to merge 1 commit intomasterfrom
master-tx-server
Open

Implement remote transactions in gremlin-server#3328
kenhuuu wants to merge 1 commit intomasterfrom
master-tx-server

Conversation

@kenhuuu
Copy link
Contributor

@kenhuuu kenhuuu commented Mar 17, 2026

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

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.
Copy link
Contributor

@Cole-Greer Cole-Greer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM

VOTE +1

logger.warn("Timeout waiting for boss/worker thread pools to shutdown - continuing with shutdown process.");
}

if (serverGremlinExecutor != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can this be folded into the if-statement below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ..."

@kenhuuu kenhuuu changed the title server implementation of transactions Implement remote transactions in gremlin-server Mar 20, 2026
@kenhuuu kenhuuu marked this pull request as ready for review March 20, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants