kenhuuu commented on code in PR #3423: URL: https://github.com/apache/tinkerpop/pull/3423#discussion_r3313666969
########## docs/src/dev/provider/index.asciidoc: ########## @@ -1260,8 +1260,25 @@ Graph transactions are typically `ThreadLocal`-bound. The server maintains a sin to ensure all operations execute on the same thread. This is an important implementation detail for graph system providers whose `Transaction` implementation relies on thread-local state. -NOTE: Non-transactional requests (those without a `transactionId`) are not affected by any of the transaction-specific -behavior described above. They continue to operate exactly as before. +==== Auto-Commit for Non-Transactional Requests + +Non-transactional requests (those without a `transactionId`) are not affected by any of the transaction-specific +behavior described above. However, if the underlying graph supports transactions, the server must automatically manage +transactions for these requests: + +* Before processing: roll back any stale open transaction to prevent state leakage between requests. +* On success: commit the transaction after the traversal has been fully iterated and serialized. +* On error: roll back the transaction so that partial mutations are not persisted. + +This auto-commit behavior ensures that users who do not use explicit transactions still get durable writes on success +and clean rollback on failure. Graph system providers implementing their own server or HTTP endpoint must replicate Review Comment: I'll change the wording to `should`, but no there are no consequences as to the user it would just look like it worked even though it failed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
