-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TINKERPOP-2555 - Remote Transaction Support (g.tx()) for gremlin-python #1515
Conversation
[1] Added transaction profile to pom.xml [2] Made DriverRemoteConnection latch parameters so they can be reused to create a subsequent session [3] Added logging throughout the driver [4] Added commit and rollback to DriverRemoteConnection [5] Added some logging to receive message [6] Added transaction support to RemoteConnection [7] Added bytecode support to Session processor [8] Fixed bug in aiohttp transport layer that popped up when it was not shutdown properly [9] Added Transaction class to graph_traversal.py, added tx function which generates a Transaction [10] Added create_graph_op method that allows a simple Bytecode with source to be created [11] Added GraphOp class with commit and rollback functions which return Bytecode for commit and rollback Test: [12] Enhance test configuration to have remote_transaction_connection [13] Updated submitAsync -> submit_async for test_client [14] Added transaction test to exercise basic commit [15] Added transaction test to exercise basic rollback [16] Added transaction test to exercise multi commit [17] Added transaction test to exercise multi rollback [18] Added transaction test to exercise multi commit and rollback together [19] Added transaction test to exercise illegal operations (negative test) Documentation: [20] Added updated documentation for gtx implementation
[2] Enabling transaction tests in GitHub actions
I restarted the tests and they pass now. I can't imagine why |
gremlin-python/src/main/python/gremlin_python/driver/aiohttp/transport.py
Show resolved
Hide resolved
gremlin-python/src/main/python/gremlin_python/driver/driver_remote_connection.py
Show resolved
Hide resolved
gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py
Outdated
Show resolved
Hide resolved
I've made a first pass at this. I'll give it another when you address these initial comments, but overall it looks good and it seems like there is little to really change of substance. From a documentation perspective could you also please add a section like this to the Upgrade Docs: and then section in the Reference Documentation like this under the Python section: You did a really nice job with this! This is a great contribution - Thanks! |
…d message Fixed missing session close in Client Switched info to debug log for heavy spam messages Added gremlin-variant remote transaction documentation for gremlin-python Added release documentation for remote transactions in gremlin-python
I have not had a chance to build this branch but I have taken time to look over all of the changes for TX and AioHTTP closing issues and it looks good to me. Thanks for all the work on this one. VOTE +1 |
VOTE +1 |
@lyndonb-bq - i tried to build this without |
@spmallette I missed that on my first pass, thanks for catching it. I have corrected this behaviour in my recent commit and verified it on my local machine. I tried both ways (with and without -DincludeNeo4j and both work on my local. |
nice - merged now - thank you! |
Summary
The following gremlin-python features and bugs are addressed in this pull request:
g.tx()
)aiohttp
stack trace pop upRelated tickets
TINKERPOP-2555 - g.tx() support for gremlin-python
TINKERPOP-2637 - Support for logger in gremlin-python
TINKERPOP-2662 - Improper closing of gremlin-python driver causes exceptions
High level overview of individual changes made
Source:
neo4j-gremlin
dependency topom.xml
, fixed issue withTEST_TRANSACTION
environment variable.DriverRemoteConnection
latch parameters so they can be reused to create a subsequent sessioncommit
androllback
toDriverRemoteConnection
RemoteConnection
Bytecode
support toSession
processor
aiohttp
transport layer that popped up when it was not shutdown properlyTransaction
class tograph_traversal.py
, addedtx
function which generates aTransaction
create_graph_op
method that allows a simpleBytecode
with source to be createdGraphOp
class withcommit
androllback
functions which returnBytecode
forcommit
androllback
Test:
remote_transaction_connection
submitAsync
->submit_async
fortest_client
commit
rollback
commit
rollback
commit
androllback
togetherDocumentation:
g.tx()
support, logging, and aiohttp shutdown fix in gremlin-python