blob: 7a6c73df490c73703977b97dc19bc8c0bcd739e0 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-61232409-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-61232409-1');
</script>
<meta charset="UTF-8">
<meta name="ignite-version" content="2.9.0" />
<title>Multiversion Concurrency Control | Ignite Documentation</title>
<link rel="canonical" href="/docs/latest/transactions/mvcc" />
<link rel="stylesheet" href="/assets/css/styles.css?1600975888">
<link rel="stylesheet" href="/assets/css/asciidoc-pygments.css">
<link rel="shortcut icon" href="/favicon.ico">
<meta name='viewport' content='width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0'>
<script type="text/javascript" src="/assets/js/anchor.min.js?1600975888"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
</head>
<body>
<header>
<!--#include virtual="/includes/promotion_banner.html" -->
<div class="container">
<button type='button' class='menu' title='Docs menu'>
<img src="/assets/images/menu-icon.svg"/>
</button>
<div class='home'>
<a href="/" class='home' title='Apache Ignite home'>
<img src="/assets/images/apache_ignite_logo.svg" alt="Apache Ignite logo" width="103" >
</a>
</div>
<nav>
</nav>
<select id="version-selector">
<option value="2.9.0">2.9.0</option>
</select>
<a href="https://github.com/apache/ignite" title='GitHub' class='github' target="_blank">
<img src="/assets/images/github-gray.svg" alt="GitHub logo">
</a>
<form class='search'>
<button class="search-close" type='button'><img src='/assets/images/cancel.svg'></button>
<input type="search" placeholder="Search…" id="search-input">
</form>
<button type='button' class='search-toggle'><img src='/assets/images/search.svg'></button>
<button type='button' class='top-nav-toggle'></button>
</div>
</header>
<link rel="stylesheet" href="/assets/css/docs.css">
<section class='page-docs'>
<nav class='left-nav' data-swiftype-index='false'>
<li>
<a href="/docs/latest/preface" class='' >Preface</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Quick Start Guides<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/quick-start/java"
class=''
>Java</a>
</li>
<li>
<a href="/docs/latest/quick-start/dotnet"
class=''
>.NET/C#</a>
</li>
<li>
<a href="/docs/latest/quick-start/cpp"
class=''
>C++</a>
</li>
<li>
<a href="/docs/latest/quick-start/python"
class=''
>Python</a>
</li>
<li>
<a href="/docs/latest/quick-start/nodejs"
class=''
>Node.JS</a>
</li>
<li>
<a href="/docs/latest/quick-start/sql"
class=''
>SQL</a>
</li>
<li>
<a href="/docs/latest/quick-start/php"
class=''
>PHP</a>
</li>
<li>
<a href="/docs/latest/quick-start/restapi"
class=''
>REST API</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="/installation" class='group-toggle collapsed '>Installation<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/installation/installing-using-zip"
class=''
>Installing Using ZIP Archive</a>
</li>
<li>
<a href="/docs/latest/installation/installing-using-docker"
class=''
>Installing Using Docker</a>
</li>
<li>
<a href="/docs/latest/installation/deb-rpm"
class=''
>Installing DEB or RPM package</a>
</li>
<li>
<button
type='button'
class='collapsed '>Kubernetes<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//installation/kubernetes/amazon-eks-deployment" class=''>Amazon EKS</a></li>
<li><a href="/docs/latest//installation/kubernetes/azure-deployment" class=''>Azure Kubernetes Service</a></li>
<li><a href="/docs/latest//installation/kubernetes/gke-deployment" class=''>Google Kubernetes Engine</a></li>
</nav>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Setting Up<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/setup"
class=''
>Setting Up Ignite for Java</a>
</li>
<li>
<a href="/docs/latest/setup-dotnet"
class=''
>Setting Up Ignite for .NET/C#</a>
</li>
</nav>
</li>
<li>
<a href="/docs/latest/understanding-configuration" class='' >Understanding Configuration</a>
</li>
<li>
<a href="/docs/latest/logging" class='' >Configuring Logging</a>
</li>
<li>
<a href="/docs/latest/starting-nodes" class='' >Starting and Stopping Nodes</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Clustering<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/clustering/clustering"
class=''
>Overview</a>
</li>
<li>
<a href="/docs/latest/clustering/tcp-ip-discovery"
class=''
>TCP/IP Discovery</a>
</li>
<li>
<a href="/docs/latest/clustering/zookeeper-discovery"
class=''
>ZooKeeper Discovery</a>
</li>
<li>
<a href="/docs/latest/clustering/discovery-in-the-cloud"
class=''
>Discovery in the Cloud</a>
</li>
<li>
<a href="/docs/latest/clustering/network-configuration"
class=''
>Network Configuration</a>
</li>
<li>
<a href="/docs/latest/clustering/connect-client-nodes"
class=''
>Connecting Client Nodes</a>
</li>
<li>
<a href="/docs/latest/clustering/running-client-nodes-behind-nat"
class=''
>Running Client Nodes Behind NAT</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Data Modeling<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/data-modeling/data-modeling"
class=''
>Introduction</a>
</li>
<li>
<a href="/docs/latest/data-modeling/data-partitioning"
class=''
>Data Partitioning</a>
</li>
<li>
<a href="/docs/latest/data-modeling/affinity-collocation"
class=''
>Affinity Colocation</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Configuring Memory<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/memory-architecture"
class=''
>Memory Architecture</a>
</li>
<li>
<a href="/docs/latest/memory-configuration/data-regions"
class=''
>Configuring Data Regions</a>
</li>
<li>
<a href="/docs/latest/memory-configuration/eviction-policies"
class=''
>Eviction Policies</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Configuring Caches<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/configuring-caches/configuration-overview"
class=''
>Cache Configuration</a>
</li>
<li>
<a href="/docs/latest/configuring-caches/configuring-backups"
class=''
>Configuring Partition Backups</a>
</li>
<li>
<a href="/docs/latest/configuring-caches/atomicity-modes"
class=''
>Atomicity Modes</a>
</li>
<li>
<a href="/docs/latest/configuring-caches/expiry-policies"
class=''
>Expiry Policy</a>
</li>
<li>
<a href="/docs/latest/configuring-caches/on-heap-caching"
class=''
>On-Heap Caching</a>
</li>
<li>
<a href="/docs/latest/configuring-caches/cache-groups"
class=''
>Cache Groups</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Persistence<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/persistence/native-persistence"
class=''
>Ignite Persistence</a>
</li>
<li>
<a href="/docs/latest/persistence/external-storage"
class=''
>External Storage</a>
</li>
<li>
<a href="/docs/latest/persistence/swap"
class=''
>Swapping</a>
</li>
<li>
<a href="/docs/latest/persistence/custom-cache-store"
class=''
>Implementing Custom Cache Store</a>
</li>
<li>
<a href="/docs/latest/persistence/snapshots"
class=''
>Cluster Snapshots</a>
</li>
<li>
<a href="/docs/latest/persistence/disk-compression"
class=''
>Disk Compression</a>
</li>
<li>
<a href="/docs/latest/persistence/persistence-tuning"
class=''
>Tuning Persistence</a>
</li>
</nav>
</li>
<li>
<a href="/docs/latest/baseline-topology" class='' >Baseline Topology</a>
</li>
<li>
<a href="/docs/latest/cluster-states" class='' >Cluster States</a>
</li>
<li>
<a href="/docs/latest/data-rebalancing" class='' >Data Rebalancing</a>
</li>
<li>
<a href="/docs/latest/partition-loss-policy" class='' >Partition Loss Policy</a>
</li>
<li>
<a href="/docs/latest/deploying-user-code" class='' >Deploying User Code</a>
</li>
<li>
<a href="/docs/latest/peer-class-loading" class='' >Peer Class Loading</a>
</li>
<li>
<a href="/docs/latest/data-streaming" class='' >Data Streaming</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Using Key-Value Cache API<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/key-value-api/basic-cache-operations"
class=''
>Basic Cache Operations</a>
</li>
<li>
<a href="/docs/latest/key-value-api/binary-objects"
class=''
>Working with Binary Objects</a>
</li>
<li>
<a href="/docs/latest/key-value-api/using-scan-queries"
class=''
>Using Scan Queries</a>
</li>
<li>
<a href="/docs/latest/read-repair"
class=''
>Read Repair</a>
</li>
</nav>
</li>
<li>
<a href="/docs/latest/key-value-api/continuous-queries" class='' >Using Continuous Queries</a>
</li>
<li>
<a href="/docs/latest/key-value-api/transactions" class='' >Performing Transactions</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Working with SQL<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/SQL/sql-introduction"
class=''
>Introduction</a>
</li>
<li>
<a href="/docs/latest/SQL/schemas"
class=''
>Understanding Schemas</a>
</li>
<li>
<a href="/docs/latest/SQL/indexes"
class=''
>Defining Indexes</a>
</li>
<li>
<a href="/docs/latest/SQL/sql-api"
class=''
>Using SQL API</a>
</li>
<li>
<a href="/docs/latest/SQL/distributed-joins"
class=''
>Distributed Joins</a>
</li>
<li>
<a href="/docs/latest/SQL/sql-transactions"
class=''
>SQL Transactions</a>
</li>
<li>
<a href="/docs/latest/SQL/custom-sql-func"
class=''
>Custom SQL Functions</a>
</li>
<li>
<a href="/docs/latest/SQL/JDBC/jdbc-driver"
class=''
>JDBC Driver</a>
</li>
<li>
<a href="/docs/latest/SQL/JDBC/jdbc-client-driver"
class=''
>JDBC Client Driver</a>
</li>
<li>
<a href="/docs/latest/transactions/mvcc"
class=''
>Multiversion Concurrency Control</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Distributed Computing<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/distributed-computing/distributed-computing"
class=''
>Distributed Computing API</a>
</li>
<li>
<a href="/docs/latest/distributed-computing/cluster-groups"
class=''
>Cluster Groups</a>
</li>
<li>
<a href="/docs/latest/distributed-computing/executor-service"
class=''
>Executor Service</a>
</li>
<li>
<a href="/docs/latest/distributed-computing/map-reduce"
class=''
>MapReduce API</a>
</li>
<li>
<a href="/docs/latest/distributed-computing/load-balancing"
class=''
>Load Balancing</a>
</li>
<li>
<a href="/docs/latest/distributed-computing/fault-tolerance"
class=''
>Fault Tolerance</a>
</li>
<li>
<a href="/docs/latest/distributed-computing/job-scheduling"
class=''
>Job Scheduling</a>
</li>
</nav>
</li>
<li>
<a href="/docs/latest/collocated-computations" class='' >Colocating Computations with Data</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Working with Events<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/events/listening-to-events"
class=''
>Enabling and Listenting to Events</a>
</li>
<li>
<a href="/docs/latest/events/events"
class=''
>Events</a>
</li>
</nav>
</li>
<li>
<a href="/docs/latest/near-cache" class='' >Near Caches</a>
</li>
<li>
<a href="/docs/latest/platform-cache" class='' >.NET Platform Cache</a>
</li>
<li>
<a href="/docs/latest/services/services" class='' >Services</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Distributed Data Structures<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/data-structures/queue-and-set"
class=''
>Queue and Set</a>
</li>
<li>
<a href="/docs/latest/data-structures/atomic-types"
class=''
>Atomic Types</a>
</li>
<li>
<a href="/docs/latest/data-structures/countdownlatch"
class=''
>CountDownLatch</a>
</li>
<li>
<a href="/docs/latest/data-structures/atomic-sequence"
class=''
>Atomic Sequence</a>
</li>
<li>
<a href="/docs/latest/data-structures/semaphore"
class=''
>Semaphore</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Machine Learning<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/machine-learning/machine-learning"
class=''
>Machine Learning</a>
</li>
<li>
<a href="/docs/latest/machine-learning/partition-based-dataset"
class=''
>Partition Based Dataset</a>
</li>
<li>
<a href="/docs/latest/machine-learning/updating-trained-models"
class=''
>Updating Trained Models</a>
</li>
<li>
<button
type='button'
class='collapsed '>Binary Classification<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//machine-learning/binary-classification/introduction" class=''>Introduction</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/linear-svm" class=''>Linear SVM (Support Vector Machine)</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/decision-trees" class=''>Decision Trees</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/multilayer-perceptron" class=''>Multilayer Perceptron</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/logistic-regression" class=''>Logistic Regression</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/knn-classification" class=''>k-NN Classification</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/ann" class=''>ANN (Approximate Nearest Neighbor)</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/naive-bayes" class=''>Naive Bayes</a></li>
</nav>
</li>
<li>
<button
type='button'
class='collapsed '>Regression<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//machine-learning/regression/introduction" class=''>Introduction</a></li>
<li><a href="/docs/latest//machine-learning/regression/linear-regression" class=''>Linear Regression</a></li>
<li><a href="/docs/latest//machine-learning/regression/decision-trees-regression" class=''>Decision Trees Regression</a></li>
<li><a href="/docs/latest//machine-learning/regression/knn-regression" class=''>k-NN Regression</a></li>
</nav>
</li>
<li>
<button
type='button'
class='collapsed '>Clustering<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//machine-learning/clustering/introduction" class=''>Introduction</a></li>
<li><a href="/docs/latest//machine-learning/clustering/k-means-clustering" class=''>K-Means Clustering</a></li>
<li><a href="/docs/latest//machine-learning/clustering/gaussian-mixture" class=''>Gaussian mixture (GMM)</a></li>
</nav>
</li>
<li>
<a href="/docs/latest/machine-learning/preprocessing"
class=''
>Preprocessing</a>
</li>
<li>
<button
type='button'
class='collapsed '>Model Selection<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//machine-learning/model-selection/introduction" class=''>Introduction</a></li>
<li><a href="/docs/latest//machine-learning/model-selection/evaluator" class=''>Evaluator</a></li>
<li><a href="/docs/latest//machine-learning/model-selection/split-the-dataset-on-test-and-train-datasets" class=''>Split the dataset on test and train datasets</a></li>
<li><a href="/docs/latest//machine-learning/model-selection/hyper-parameter-tuning" class=''>Hyper-parameter tuning</a></li>
<li><a href="/docs/latest//machine-learning/model-selection/pipeline-api" class=''>Pipeline API</a></li>
</nav>
</li>
<li>
<a href="/docs/latest/machine-learning/multiclass-classification"
class=''
>Multiclass Classification</a>
</li>
<li>
<button
type='button'
class='collapsed '>Ensemble Methods<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//machine-learning/ensemble-methods/introduction" class=''></a></li>
<li><a href="/docs/latest//machine-learning/ensemble-methods/stacking" class=''>Stacking</a></li>
<li><a href="/docs/latest//machine-learning/ensemble-methods/baggin" class=''>Bagging</a></li>
<li><a href="/docs/latest//machine-learning/ensemble-methods/random-forest" class=''>Random Forest</a></li>
<li><a href="/docs/latest//machine-learning/ensemble-methods/gradient-boosting" class=''>Gradient Boosting</a></li>
</nav>
</li>
<li>
<a href="/docs/latest/machine-learning/recommendation-systems"
class=''
>Recommendation Systems</a>
</li>
<li>
<button
type='button'
class='collapsed '>Importing Model<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//machine-learning/importing-model/introduction" class=''>Introduction</a></li>
<li><a href="/docs/latest//machine-learning/importing-model/model-import-from-gxboost" class=''>Import Model from XGBoost</a></li>
<li><a href="/docs/latest//machine-learning/importing-model/model-import-from-apache-spark" class=''>Import Model from Apache Spark</a></li>
</nav>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Monitoring<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/monitoring-metrics/intro"
class=''
>Introduction</a>
</li>
<li>
<a href="/docs/latest/monitoring-metrics/cluster-id"
class=''
>Cluster ID and Tag</a>
</li>
<li>
<button
type='button'
class='collapsed '>Metrics<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//monitoring-metrics/configuring-metrics" class=''>Configuring Metrics</a></li>
<li><a href="/docs/latest//monitoring-metrics/metrics" class=''>JMX Metrics</a></li>
</nav>
</li>
<li>
<button
type='button'
class='collapsed '>New Metrics System<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//monitoring-metrics/new-metrics-system" class=''>Introduction</a></li>
<li><a href="/docs/latest//monitoring-metrics/new-metrics" class=''>Metrics</a></li>
</nav>
</li>
<li>
<a href="/docs/latest/monitoring-metrics/system-views"
class=''
>System Views</a>
</li>
<li>
<a href="/docs/latest/monitoring-metrics/tracing"
class=''
>Tracing</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="/security" class='group-toggle collapsed '>Security<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/security/authentication"
class=''
>Authentication</a>
</li>
<li>
<a href="/docs/latest/security/ssl-tls"
class=''
>SSL/TLS</a>
</li>
<li>
<button
type='button'
class='collapsed '>Transparent Data Encryption<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//security/tde" class=''>Introduction</a></li>
<li><a href="/docs/latest//security/master-key-rotation" class=''>Master key rotation</a></li>
</nav>
</li>
<li>
<a href="/docs/latest/security/sandbox"
class=''
>Sandbox</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Thin Clients<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/thin-clients/getting-started-with-thin-clients"
class=''
>Thin Clients Overview</a>
</li>
<li>
<a href="/docs/latest/thin-clients/java-thin-client"
class=''
>Java Thin Client</a>
</li>
<li>
<a href="/docs/latest/thin-clients/dotnet-thin-client"
class=''
>.NET Thin Client</a>
</li>
<li>
<a href="/docs/latest/thin-clients/cpp-thin-client"
class=''
>C++ Thin Client</a>
</li>
<li>
<a href="/docs/latest/thin-clients/python-thin-client"
class=''
>Python Thin Client</a>
</li>
<li>
<a href="/docs/latest/thin-clients/php-thin-client"
class=''
>PHP Thin Client</a>
</li>
<li>
<a href="/docs/latest/thin-clients/nodejs-thin-client"
class=''
>Node.js Thin Client</a>
</li>
<li>
<button
type='button'
class='collapsed '>Binary Client Protocol<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//binary-client-protocol/binary-client-protocol" class=''>Binary Client Protocol</a></li>
<li><a href="/docs/latest//binary-client-protocol/data-format" class=''>Data Format</a></li>
<li><a href="/docs/latest//binary-client-protocol/key-value-queries" class=''>Key-Value Queries</a></li>
<li><a href="/docs/latest//binary-client-protocol/sql-and-scan-queries" class=''>SQL and Scan Queries</a></li>
<li><a href="/docs/latest//binary-client-protocol/binary-type-metadata" class=''>Binary Types Metadata</a></li>
<li><a href="/docs/latest//binary-client-protocol/cache-configuration" class=''>Cache Configuration</a></li>
</nav>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>ODBC Driver<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/SQL/ODBC/odbc-driver"
class=''
>ODBC Driver</a>
</li>
<li>
<a href="/docs/latest/SQL/ODBC/connection-string-dsn"
class=''
>Connection String and DSN</a>
</li>
<li>
<a href="/docs/latest/SQL/ODBC/querying-modifying-data"
class=''
>Querying and Modifying Data</a>
</li>
<li>
<a href="/docs/latest/SQL/ODBC/specification"
class=''
>Specification</a>
</li>
<li>
<a href="/docs/latest/SQL/ODBC/data-types"
class=''
>Data Types</a>
</li>
<li>
<a href="/docs/latest/SQL/ODBC/error-codes"
class=''
>Error Codes</a>
</li>
</nav>
</li>
<li>
<a href="/docs/latest/restapi" class='' >REST API</a>
</li>
<li>
<a href="/docs/latest/control-script" class='' >Control Script</a>
</li>
<li>
<a href="/docs/latest/plugins" class='' >Plugins</a>
</li>
<li>
<a href="/docs/latest/sqlline" class='' >SQLLine</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Ignite for Spark<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/ignite-for-spark/overview"
class=''
>Overview</a>
</li>
<li>
<a href="/docs/latest/ignite-for-spark/ignitecontext-and-rdd"
class=''
>IgniteContext and IgniteRDD</a>
</li>
<li>
<a href="/docs/latest/ignite-for-spark/ignite-dataframe"
class=''
>Ignite DataFrame</a>
</li>
<li>
<a href="/docs/latest/ignite-for-spark/installation"
class=''
>Installation</a>
</li>
<li>
<a href="/docs/latest/ignite-for-spark/spark-shell"
class=''
>Test Ignite with Spark-shell</a>
</li>
<li>
<a href="/docs/latest/ignite-for-spark/troubleshooting"
class=''
>Troubleshooting</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="/sql-reference/sql-reference-overview" class='group-toggle collapsed '>SQL Reference<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/sql-reference/sql-conformance"
class=''
>SQL Conformance</a>
</li>
<li>
<a href="/docs/latest/sql-reference/ddl"
class=''
>Data Definition Language (DDL)</a>
</li>
<li>
<a href="/docs/latest/sql-reference/dml"
class=''
>Data Manipulation Language (DML)</a>
</li>
<li>
<a href="/docs/latest/sql-reference/transactions"
class=''
>Transactions</a>
</li>
<li>
<a href="/docs/latest/sql-reference/operational-commands"
class=''
>Operational Commands</a>
</li>
<li>
<a href="/docs/latest/sql-reference/aggregate-functions"
class=''
>Aggregate functions</a>
</li>
<li>
<a href="/docs/latest/sql-reference/numeric-functions"
class=''
>Numeric Functions</a>
</li>
<li>
<a href="/docs/latest/sql-reference/string-functions"
class=''
>String Functions</a>
</li>
<li>
<a href="/docs/latest/sql-reference/date-time-functions"
class=''
>Data and Time Functions</a>
</li>
<li>
<a href="/docs/latest/sql-reference/system-functions"
class=''
>System Functions</a>
</li>
<li>
<a href="/docs/latest/sql-reference/data-types"
class=''
>Data Types</a>
</li>
</nav>
</li>
</nav>
<div class="left-nav__overlay"></div>
<article data-swiftype-index='true'>
<a class='edit-link' href="https://github.com/apache/ignite/tree/IGNITE-7595/docs/_docs/transactions/mvcc.adoc" target="_blank">Edit</a>
<h1>Multiversion Concurrency Control</h1>
<div id="preamble">
<div class="sectionbody">
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<div class="title">Important</div>
</td>
<td class="content">
MVCC is currently in beta.
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="overview">Overview</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Caches with the <code>TRANSACTIONAL_SNAPSHOT</code> atomicity mode support SQL transactions as well as <a href="/docs/latest/key-value-api/transactions">key-value transactions</a> and enable multiversion concurrency control (MVCC) for both types of transactions.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="multiversion-concurrency-control">Multiversion Concurrency Control</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Multiversion Concurrency Control (MVCC) is a method of controlling the consistency of data accessed by multiple users concurrently. MVCC implements the <a href="https://en.wikipedia.org/wiki/Snapshot_isolation">snapshot isolation</a> guarantee which ensures that each transaction always sees a consistent snapshot of data.</p>
</div>
<div class="paragraph">
<p>Each transaction obtains a consistent snapshot of data when it starts and can only view and modify data in this snapshot.
When the transaction updates an entry, Ignite verifies that the entry has not been updated by other transactions and creates a new version of the entry.
The new version becomes visible to other transactions only when and if this transaction commits successfully.
If the entry has been updated, the current transaction fails with an exception (see the <a href="#concurrent-updates">Concurrent Updates</a> section for the information on how to handle update conflicts).</p>
</div>
<div class="paragraph">
<p>The snapshots are not physical snapshots but logical snapshots that are generated by the MVCC-coordinator: a cluster node that coordinates transactional activity in the cluster. The coordinator keeps track of all active transactions and is notified when each transaction finishes. All operations with an MVCC-enabled cache request a snapshot of data from the coordinator.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="enabling-mvcc">Enabling MVCC</h2>
<div class="sectionbody">
<div class="paragraph">
<p>To enable MVCC for a cache, use the <code>TRANSACTIONAL_SNAPSHOT</code> atomicity mode in the cache configuration. If you create a table with the <code>CREATE TABLE</code> command, specify the atomicity mode as a parameter in the <code>WITH</code> part of the command:</p>
</div>
<code-tabs><code-tab data-tab='XML'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="xml"><span class="nt">&lt;bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.configuration.IgniteConfiguration"</span><span class="nt">&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"cacheConfiguration"</span><span class="nt">&gt;</span>
<span class="nt">&lt;bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.configuration.CacheConfiguration"</span><span class="nt">&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"name"</span> <span class="na">value=</span><span class="s">"myCache"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"atomicityMode"</span> <span class="na">value=</span><span class="s">"TRANSACTIONAL_SNAPSHOT"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/bean&gt;</span>
<span class="nt">&lt;/property&gt;</span>
<span class="nt">&lt;/bean&gt;</span></code></pre>
</div>
</div></code-tab><code-tab data-tab='SQL'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="sql"><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">Person</span> <span class="k">WITH</span> <span class="nv">"ATOMICITY=TRANSACTIONAL_SNAPSHOT"</span></code></pre>
</div>
</div></code-tab></code-tabs>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
The <code>TRANSACTIONAL_SNAPSHOT</code> mode only supports the default concurrency mode (<code>PESSIMISTIC</code>) and default isolation level (<code>REPEATABLE_READ</code>). See <a href="/docs/latest/key-value-api/transactions#concurrency-modes-and-isolation-levels">Concurrency modes and isolation levels</a> for details.
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="concurrent-updates">Concurrent Updates</h2>
<div class="sectionbody">
<div class="paragraph">
<p>If an entry is read and then updated within a single transaction, it is possible that another transaction could be processed in between the two operations and update the entry first. In this case, an exception is thrown when the first transaction attempts to update the entry and the transaction is marked as "rollback only". You have to retry the transaction.</p>
</div>
<div class="paragraph">
<p>This is how to tell that an update conflict has occurred:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>When Java transaction API is used, a <code>CacheException</code> is thrown with the message <code>Cannot serialize transaction due to write conflict (transaction is marked for rollback)</code> and the <code>Transaction.rollbackOnly</code> flag is set to <code>true</code>.</p>
</li>
<li>
<p>When SQL transactions are executed through the JDBC or ODBC driver, the <code>SQLSTATE:40001</code> error code is returned.</p>
</li>
</ul>
</div>
<code-tabs><code-tab data-tab='Ignite Java'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="java"><span class="k">for</span><span class="o">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">1</span><span class="o">;</span> <span class="n">i</span> <span class="o">&lt;=</span><span class="mi">5</span> <span class="o">;</span> <span class="n">i</span><span class="o">++)</span> <span class="o">{</span>
<span class="k">try</span> <span class="o">(</span><span class="nc">Transaction</span> <span class="n">tx</span> <span class="o">=</span> <span class="nc">Ignition</span><span class="o">.</span><span class="na">ignite</span><span class="o">().</span><span class="na">transactions</span><span class="o">().</span><span class="na">txStart</span><span class="o">())</span> <span class="o">{</span>
<span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"attempt #"</span> <span class="o">+</span> <span class="n">i</span> <span class="o">+</span> <span class="s">", value: "</span> <span class="o">+</span> <span class="n">cache</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="mi">1</span><span class="o">));</span>
<span class="k">try</span> <span class="o">{</span>
<span class="n">cache</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="mi">1</span><span class="o">,</span> <span class="s">"new value"</span><span class="o">);</span>
<span class="n">tx</span><span class="o">.</span><span class="na">commit</span><span class="o">();</span>
<span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"attempt #"</span> <span class="o">+</span> <span class="n">i</span> <span class="o">+</span> <span class="s">" succeeded"</span><span class="o">);</span>
<span class="k">break</span><span class="o">;</span>
<span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="nc">CacheException</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
<span class="k">if</span> <span class="o">(!</span><span class="n">tx</span><span class="o">.</span><span class="na">isRollbackOnly</span><span class="o">())</span> <span class="o">{</span>
<span class="c1">// Transaction was not marked as "rollback only",</span>
<span class="c1">// so it's not a concurrent update issue.</span>
<span class="c1">// Process the exception here.</span>
<span class="k">break</span><span class="o">;</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="o">}</span></code></pre>
</div>
</div></code-tab><code-tab data-tab='JDBC'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="java"><span class="nc">Class</span><span class="o">.</span><span class="na">forName</span><span class="o">(</span><span class="s">"org.apache.ignite.IgniteJdbcThinDriver"</span><span class="o">);</span>
<span class="c1">// Open JDBC connection.</span>
<span class="nc">Connection</span> <span class="n">conn</span> <span class="o">=</span> <span class="nc">DriverManager</span><span class="o">.</span><span class="na">getConnection</span><span class="o">(</span><span class="s">"jdbc:ignite:thin://127.0.0.1"</span><span class="o">);</span>
<span class="nc">PreparedStatement</span> <span class="n">updateStmt</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
<span class="nc">PreparedStatement</span> <span class="n">selectStmt</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
<span class="k">try</span> <span class="o">{</span>
<span class="c1">// starting a transaction</span>
<span class="n">conn</span><span class="o">.</span><span class="na">setAutoCommit</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
<span class="n">selectStmt</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="na">prepareStatement</span><span class="o">(</span><span class="s">"select name from Person where id = 1"</span><span class="o">);</span>
<span class="n">selectStmt</span><span class="o">.</span><span class="na">setInt</span><span class="o">(</span><span class="mi">1</span><span class="o">,</span> <span class="mi">1</span><span class="o">);</span>
<span class="nc">ResultSet</span> <span class="n">rs</span> <span class="o">=</span> <span class="n">selectStmt</span><span class="o">.</span><span class="na">executeQuery</span><span class="o">();</span>
<span class="k">if</span> <span class="o">(</span><span class="n">rs</span><span class="o">.</span><span class="na">next</span><span class="o">())</span>
<span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"name = "</span> <span class="o">+</span> <span class="n">rs</span><span class="o">.</span><span class="na">getString</span><span class="o">(</span><span class="s">"name"</span><span class="o">));</span>
<span class="n">updateStmt</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="na">prepareStatement</span><span class="o">(</span><span class="s">"update Person set name = ? where id = ? "</span><span class="o">);</span>
<span class="n">updateStmt</span><span class="o">.</span><span class="na">setString</span><span class="o">(</span><span class="mi">1</span><span class="o">,</span> <span class="s">"New Name"</span><span class="o">);</span>
<span class="n">updateStmt</span><span class="o">.</span><span class="na">setInt</span><span class="o">(</span><span class="mi">2</span><span class="o">,</span> <span class="mi">1</span><span class="o">);</span>
<span class="n">updateStmt</span><span class="o">.</span><span class="na">executeUpdate</span><span class="o">();</span>
<span class="c1">// committing the transaction</span>
<span class="n">conn</span><span class="o">.</span><span class="na">commit</span><span class="o">();</span>
<span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="nc">SQLException</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
<span class="k">if</span> <span class="o">(</span><span class="s">"40001"</span><span class="o">.</span><span class="na">equals</span><span class="o">(</span><span class="n">e</span><span class="o">.</span><span class="na">getSQLState</span><span class="o">()))</span> <span class="o">{</span>
<span class="c1">// retry the transaction</span>
<span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
<span class="c1">// process the exception</span>
<span class="o">}</span>
<span class="o">}</span> <span class="k">finally</span> <span class="o">{</span>
<span class="k">if</span> <span class="o">(</span><span class="n">updateStmt</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <span class="n">updateStmt</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
<span class="k">if</span> <span class="o">(</span><span class="n">selectStmt</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <span class="n">selectStmt</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
<span class="o">}</span></code></pre>
</div>
</div></code-tab><code-tab data-tab='C#/.NET'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="csharp"><span class="k">for</span> <span class="p">(</span><span class="kt">var</span> <span class="n">i</span> <span class="p">=</span> <span class="m">1</span><span class="p">;</span> <span class="n">i</span> <span class="p">&lt;=</span> <span class="m">5</span><span class="p">;</span> <span class="n">i</span><span class="p">++)</span>
<span class="p">{</span>
<span class="k">using</span> <span class="p">(</span><span class="kt">var</span> <span class="n">tx</span> <span class="p">=</span> <span class="n">ignite</span><span class="p">.</span><span class="nf">GetTransactions</span><span class="p">().</span><span class="nf">TxStart</span><span class="p">())</span>
<span class="p">{</span>
<span class="n">Console</span><span class="p">.</span><span class="nf">WriteLine</span><span class="p">(</span><span class="s">$"attempt #</span><span class="p">{</span><span class="n">i</span><span class="p">}</span><span class="s">, value: </span><span class="p">{</span><span class="n">cache</span><span class="p">.</span><span class="nf">Get</span><span class="p">(</span><span class="m">1</span><span class="p">)}</span><span class="s">"</span><span class="p">);</span>
<span class="k">try</span>
<span class="p">{</span>
<span class="n">cache</span><span class="p">.</span><span class="nf">Put</span><span class="p">(</span><span class="m">1</span><span class="p">,</span> <span class="s">"new value"</span><span class="p">);</span>
<span class="n">tx</span><span class="p">.</span><span class="nf">Commit</span><span class="p">();</span>
<span class="n">Console</span><span class="p">.</span><span class="nf">WriteLine</span><span class="p">(</span><span class="s">$"attempt #</span><span class="p">{</span><span class="n">i</span><span class="p">}</span><span class="s"> succeeded"</span><span class="p">);</span>
<span class="k">break</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">catch</span> <span class="p">(</span><span class="n">CacheException</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">if</span> <span class="p">(!</span><span class="n">tx</span><span class="p">.</span><span class="n">IsRollbackOnly</span><span class="p">)</span>
<span class="p">{</span>
<span class="c1">// Transaction was not marked as "rollback only",</span>
<span class="c1">// so it's not a concurrent update issue.</span>
<span class="c1">// Process the exception here.</span>
<span class="k">break</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span></code></pre>
</div>
</div></code-tab><code-tab data-tab='C++'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="cpp"><span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span> <span class="n">i</span> <span class="o">&lt;=</span> <span class="mi">5</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span>
<span class="p">{</span>
<span class="n">Transaction</span> <span class="n">tx</span> <span class="o">=</span> <span class="n">ignite</span><span class="p">.</span><span class="n">GetTransactions</span><span class="p">().</span><span class="n">TxStart</span><span class="p">();</span>
<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="s">"attempt #"</span> <span class="o">&lt;&lt;</span> <span class="n">i</span> <span class="o">&lt;&lt;</span> <span class="s">", value: "</span> <span class="o">&lt;&lt;</span> <span class="n">cache</span><span class="p">.</span><span class="n">Get</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="k">try</span> <span class="p">{</span>
<span class="n">cache</span><span class="p">.</span><span class="n">Put</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s">"new value"</span><span class="p">);</span>
<span class="n">tx</span><span class="p">.</span><span class="n">Commit</span><span class="p">();</span>
<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="s">"attempt #"</span> <span class="o">&lt;&lt;</span> <span class="n">i</span> <span class="o">&lt;&lt;</span> <span class="s">" succeeded"</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="k">break</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">catch</span> <span class="p">(</span><span class="n">IgniteError</span> <span class="n">e</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">tx</span><span class="p">.</span><span class="n">IsRollbackOnly</span><span class="p">())</span>
<span class="p">{</span>
<span class="c1">// Transaction was not marked as "rollback only",</span>
<span class="c1">// so it's not a concurrent update issue.</span>
<span class="c1">// Process the exception here.</span>
<span class="k">break</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span></code></pre>
</div>
</div></code-tab></code-tabs>
</div>
</div>
<div class="sect1">
<h2 id="limitations">Limitations</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="cross-cache-transactions">Cross-Cache Transactions</h3>
<div class="paragraph">
<p>The <code>TRANSACTIONAL_SNAPSHOT</code> mode is enabled per cache and does not permit caches with different atomicity modes within the same transaction. As a consequence, if you want to cover multiple tables in one SQL transaction, all tables must be created with the <code>TRANSACTIONAL_SNAPSHOT</code> mode.</p>
</div>
</div>
<div class="sect2">
<h3 id="nested-transactions">Nested Transactions</h3>
<div class="paragraph">
<p>Ignite supports three modes of handling nested SQL transactions. They can be enabled via a JDBC/ODBC connection parameter.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell">jdbc:ignite:thin://127.0.0.1/?nestedTransactionsMode<span class="o">=</span>COMMIT</code></pre>
</div>
</div>
<div class="paragraph">
<p>When a nested transaction occurs within another transaction, the <code>nestedTransactionsMode</code> parameter dictates the system behavior:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>ERROR</code> — When the nested transaction is encountered, an error is thrown and the enclosing transaction is rolled back. This is the default behavior.</p>
</li>
<li>
<p><code>COMMIT</code> — The enclosing transaction is committed; the nested transaction starts and is committed when its COMMIT statement is encountered. The rest of the statements in the enclosing transaction are executed as implicit transactions.</p>
</li>
<li>
<p><code>IGNORE</code> — DO NOT USE THIS MODE. The beginning of the nested transaction is ignored, statements within the nested transaction will be executed as part of the enclosing transaction, and all changes will be committed with the commit of the nested transaction. The subsequent statements of the enclosing transaction will be executed as implicit transactions.</p>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="continuous-queries">Continuous Queries</h3>
<div class="paragraph">
<p>If you use <a href="/docs/latest/key-value-api/continuous-queries">Continuous Queries</a> with an MVCC-enabled cache, there are several limitations that you should be aware of:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>When an update event is received, subsequent reads of the updated key may return the old value for a period of time before the MVCC-coordinator learns of the update. This is because the update event is sent from the node where the key is updated, as soon as it is updated. In such a case, the MVCC-coordinator may not be immediately aware of that update, and therefore, subsequent reads may return outdated information during that period of time.</p>
</li>
<li>
<p>There is a limit on the number of keys per node a single transaction can update when continuous queries are used. The updated values are kept in memory, and if there are too many updates, the node might not have enough RAM to keep all the objects. To avoid OutOfMemory errors, each transaction is allowed to update at most 20,000 keys (the default value) on a single node. If this value is exceeded, the transaction will throw an exception and will be rolled back. This number can be changed by specifying the <code>IGNITE_MVCC_TX_SIZE_CACHING_THRESHOLD</code> system property.</p>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="other-limitations">Other Limitations</h3>
<div class="paragraph">
<p>The following features are not supported for the MVCC-enabled caches. These limitations may be addressed in future releases.</p>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="/docs/latest/near-cache">Near Caches</a></p>
</li>
<li>
<p><a href="/docs/latest/configuring-caches/expiry-policies">Expiry Policies</a></p>
</li>
<li>
<p><a href="/docs/latest/events/listening-to-events">Events</a></p>
</li>
<li>
<p><a href="https://ignite.apache.org/releases/2.9.0/javadoc/org/apache/ignite/cache/CacheInterceptor.html">Cache Interceptors</a></p>
</li>
<li>
<p><a href="/docs/latest/persistence/external-storage">External Storage</a></p>
</li>
<li>
<p><a href="/docs/latest/configuring-caches/on-heap-caching">On-Heap Caching</a></p>
</li>
<li>
<p><a href="https://ignite.apache.org/releases/2.9.0/javadoc/org/apache/ignite/IgniteCache.html#lock-K-">Explicit Locks</a></p>
</li>
<li>
<p>The <a href="https://ignite.apache.org/releases/2.9.0/javadoc/org/apache/ignite/IgniteCache.html#localEvict-java.util.Collection-">localEvict()</a> and <a href="https://ignite.apache.org/releases/2.9.0/javadoc/org/apache/ignite/IgniteCache.html#localPeek-K-org.apache.ignite.cache.CachePeekMode&#8230;&#8203;-">localPeek()</a> methods</p>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="copyright">
© 2020 The Apache Software Foundation.<br/>
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.
</div>
</article>
<nav class="right-nav" data-swiftype-index='false'>
<ul class="sectlevel1">
<li><a href="#overview">Overview</a></li>
<li><a href="#multiversion-concurrency-control">Multiversion Concurrency Control</a></li>
<li><a href="#enabling-mvcc">Enabling MVCC</a></li>
<li><a href="#concurrent-updates">Concurrent Updates</a></li>
<li><a href="#limitations">Limitations</a>
<ul class="sectlevel2">
<li><a href="#cross-cache-transactions">Cross-Cache Transactions</a></li>
<li><a href="#nested-transactions">Nested Transactions</a></li>
<li><a href="#continuous-queries">Continuous Queries</a></li>
<li><a href="#other-limitations">Other Limitations</a></li>
</ul>
</li>
</ul>
<footer>
</footer>
</nav>
</section>
<script type='module' src='/assets/js/code-copy-to-clipboard.js' async crossorigin></script>
<script>
// inits deep anchors -- needs to be done here because of https://www.bryanbraun.com/anchorjs/#dont-run-it-too-late
anchors.add('.page-docs h1, .page-docs h2, .page-docs h3:not(.discrete), .page-docs h4, .page-docs h5');
anchors.options = {
placement: 'right',
visible: 'always'
};
</script>
<!-- load google fonts async -->
<script type="text/javascript">
WebFontConfig = {
google: { families: [ 'Open+Sans:300,400,600,700&display=swap' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})(); </script>
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script>
docsearch({
// Your apiKey and indexName will be given to you once
// we create your config
apiKey: '3eee686c0ebe39eff3baeb18c56fa5f8',
indexName: 'apache_ignite',
// Replace inputSelector with a CSS selector
// matching your search input
inputSelector: '#search-input',
// algoliaOptions: { 'facetFilters': ["version:$VERSION"] },
// Set debug to true to inspect the dropdown
debug: false,
});
</script>
<script type='module' src='/assets/js/index.js?1600975888' async crossorigin></script>
<script type='module' src='/assets/js/versioning.js?1600975888' async crossorigin></script>
</body>
</html>