TINKERPOP-3252 Replace Transaction.open() with idempotent begin()

open() and begin() were redundant ways to start a transaction, and the
strict "throw if already open" contract was incompatible with the embedded
AUTO behavior: a read opens the transaction implicitly, so a later explicit
begin() would throw even though the caller did nothing wrong. Collapsing to
a single idempotent begin() makes explicit and implicit opens compose, and
gives one consistent transaction-start verb across embedded, remote, and all
GLVs.

close() is made idempotent for the same reason — so the common
try-with-resources / double-close patterns are safe rather than surprising.

The base AbstractTransaction.begin() now opens via a guarded doOpen() so the
contract holds for every provider (not just TinkerGraph) and MANUAL mode is
no longer broken in the base class.

Assisted-by: Claude Code:claude-opus-4-8
24 files changed
tree: e96f256e3a597e1dbc68acccb9c21272cd70ef41
  1. .github/
  2. .skills/
  3. bin/
  4. data/
  5. docker/
  6. docs/
  7. gql-gremlin/
  8. gremlin-annotations/
  9. gremlin-console/
  10. gremlin-core/
  11. gremlin-dotnet/
  12. gremlin-driver/
  13. gremlin-examples/
  14. gremlin-go/
  15. gremlin-groovy/
  16. gremlin-js/
  17. gremlin-language/
  18. gremlin-python/
  19. gremlin-server/
  20. gremlin-shaded/
  21. gremlin-test/
  22. gremlin-tools/
  23. gremlin-util/
  24. hadoop-gremlin/
  25. licenses/
  26. spark-gremlin/
  27. tinkergraph-gremlin/
  28. tinkubator/
  29. .asf.yaml
  30. .dockerignore
  31. .gitignore
  32. .mailmap
  33. .travis.install-maven.sh
  34. AGENTS.md
  35. CHANGELOG.asciidoc
  36. CONTRIBUTING.md
  37. LICENSE
  38. NOTICE
  39. pom.xml
  40. README.md
  41. source-release.xml
README.md

Apache TinkerPop

Maven Central NuGet PyPI npm Go.Dev

Codecov

TinkerPop3

Apache TinkerPop™ is a graph computing framework for both graph databases (OLTP) and graph analytic systems (OLAP). It provides the Gremlin graph traversal language, drivers, and tools for working with property graphs across a wide variety of underlying data systems.

Project overview

TinkerPop defines a common interface and language (Gremlin) so that applications can work against many different graph systems without being locked into a single vendor. It includes a reference in‑memory graph database (TinkerGraph), Gremlin Server, language variants, and a rich collection of recipes and documentation.

Key resources:

Building and Testing

TinkerPop uses Maven and requires Java 11/17 for proper building and proper operations. To build, execute unit tests and package Gremlin Console/Server run:

mvn clean install

Please see the Building on Windows section for Windows-specific build instructions.

The zip distributions can be found in the following directories:

  1. gremlin-server/target
  2. gremlin-console/target

Please see the CONTRIBUTING.md file for more detailed information and options for building, test running and developing TinkerPop.

Get Started

Download Gremlin Console (compatible with Java 11/17) and unzip to a directory, then:

$ bin/gremlin.sh

         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> Gremlin.version()
==>3.8.0
gremlin> graph = TinkerFactory.createModern()
==>tinkergraph[vertices:6 edges:6]
gremlin> g = traversal().with(graph)
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g.V().has('name','vadas').valueMap()
==>[name:[vadas], age:[27]]

From the Gremlin Console, you can connect to a TinkerGraph instance and run your first traversals. Refer to the Getting Started for detailed walkthroughs and examples.

Using TinkerPop

Common ways to use TinkerPop include:

  • Embedding TinkerGraph in your application for development, testing, or lightweight graph workloads.
  • Connecting to a Gremlin‑enabled graph database via drivers or Gremlin Server.
  • Running Gremlin traversals from the JVM, or via Gremlin Language Variants (Python, .NET, JavaScript, Go, etc.).
  • Using the Gremlin Console for interactive exploration, debugging, and learning.

See the Reference Documentation for supported features, configuration options, and other details.

Documentation

The full TinkerPop documentation is published on the project website and is also maintained in this repository under docs/src/ as AsciiDoc “books.”

When changing or adding documentation, follow the existing AsciiDoc structure in docs/src/** and update the relevant index.asciidoc files so new content is included in the build.

Contributing

Contributions to Apache TinkerPop are welcome. The Developer Documentation and contributing guide describe how to set up a development environment, run tests, and submit changes.

Before opening a pull request, please:

  • Discuss larger changes on the appropriate Apache mailing list.
  • Ensure tests pass locally and, where appropriate, add new tests and documentation.
  • Update CHANGELOG.asciidoc and upgrade docs when behavior or public APIs change.

Using AI and IDE assistants

If you use AI coding agents or IDE assistants when working on TinkerPop, please consult AGENTS.md. That file summarizes:

  • Recommended build and test commands.
  • Code style and testing conventions.
  • “Do and don’t” guidance specific to automated tools.

AGENTS.md is a concise guide for tools and tool‑using contributors, while CONTRIBUTING.md and the Developer Documentation remain the canonical sources for project policies and processes.

License

Apache TinkerPop is an open source project of The Apache Software Foundation and is licensed under the Apache License, Version 2.0. See the LICENSE file in this repository for details.