option

How to configure a graph using a system or schema option.

Synopsis

option(arg)[.set( value ) | get() | unset( value)]

Graphs can be configured per graph using the following options, in either the Schema API or the System API; see those pages for examples of using option().

Table 1. Graph-Specific OptionsGraph-specific options are preceded by graph; for example, graph.allow_scan.
Option argument Setting Example Description Default
allow_scan true Allow full graph scan queries. Use only during development. true
schema_mode Production Set mode to Production or Development. Development
default_property_key_cardinality Multiple The default cardinality for automatically defined properties. Single
tx_autostart true Set transaction to start automatically or open manually. false
Table 2. TraversalSource-specific optionsTraversalSource-specific options are preceded by graph.traversal_sources.* where * must be a specified traversal source such as the graph traversal g; for example, graph.traversal_sources.g.type. The most common TraversalSource is the graph traversal g.
Option argument Setting Example Description Default
evaluation_timeout PT10S (10 seconds) or "1500 ms" Maximum time to wait for a traversal to evaluate - this will override other system level settings for the current TraversalSource. 0 days
restrict_lambda false Prevent the use of lambdas with this TraversalSource. A particular traversal source can be identified. true
type read-only Specify type of TraversalSource. A particular traversal source can be identified. default
Important: Setting a timeout value greater than 1095 days (maximum integer) can exceed the limit of a graph session. Starting a new session and setting the timeout to a lower value can recover access to a hung session. This caution is applicable for all timeouts: evaluation_timeout, system_evaluation_timeout, analytic_evaluation_timeout, and realtime_evaluation_timeout
Table 3. Transaction-specific optionsTransaction-specific options are preceded by graph.tx_groups.* where * must be specified as a transaction group or default. For example, graph.tx_groups.default.read_only will make all transactions not explicitly named read_only, whereas graph.tx_groups.myTxGroup.read_only would apply only to transactions which are given the group name myTxGroup.
Option Setting Example Description Default
authenticated_user test_user The username to use as the current user for a transaction. ANONYMOUS_USER
cache false Cache retrievals and data store calls within a transaction in transaction-level caches. This setting provides a restricted type of isolation within a transaction (concurrent modifications in other transactions aren't visible and result sets remain consistent between calls) and can improve performance at the expense of additional memory consumption. true
deep_profiling true Enable CQL tracing for profile() in queries. Very costly profiling. false
internal_vertex_verify true Set transaction to verify that vertices for internally provided auto-generated vertex ids actually exist. false
external_vertex_verify false Set transaction to verify that vertices for externally provided user-defined vertex ids actually exist. true
logged_batch true Use a logged batch when committing changes. This guarantees that all mutations will eventually occur at the expense of performance. false
max_mutations 5000 The maximum number of vertices, properties and edges (cumulatively) that may be added or removed in a single transaction. 10000
max_profile_events 5 The maximum number of profiling events to report for an individual traversal step. Restricting the number of reported events makes output manageable, but can hide important information. 10
prefetch true Sets the query executor to asynchronously pre-fetch data based on its expected execution of the traversal prior to the data being requested. This can reduce transaction latency but can cause throughput to worse. true
read_only true Set a transaction to read-only. false
read_consistency ALL Specify the consistency level for read operations of a transaction. ONE
single_thread true Set a transaction to be only accessed by a single thread. false
thread_bound true Set a transaction to be bound to a particular thread. false
transaction_timestamp The timestamp at which all mutations of this transaction are persisted. Instant.EPOCH
verify_unique false Set whether transactions should ensure that uniqueness constraints are enforced. true
vertex_cache_size 4000 Maximum size of the transaction-level cache of recently-used vertices 10000l
vertex_dirty_size This is a performance hint for write-heavy, performance-sensitive transactional workloads. If set, it should roughly match the median vertices modified per transaction. 32
write_consistency ANY Specify the consistency level for write operations of a transaction QUORUM

Description

Configure a graph. Options can be set with either the System API or Schema API, and get or unset operations are accomplished with the Schema API.