@@ -89,19 +89,13 @@ and multiversion concurrency control (``box.stat.memtx().tx.mvcc``).
89
89
90
90
**Example **
91
91
92
- Let's get memory statistics for ``used `` tuples in a transaction.
92
+ This example illustrates memory statistics for ``used `` tuples in a transaction.
93
93
94
- First, we :ref: `enable MVCC <txn_mode_mvcc-enabling >` so that
94
+ The cluster must be started with the :ref: `database.use_mvcc_engine <configuration_reference_database_use_mvcc_engine >`
95
+ parameter set to true. This :ref: `enables MVCC <txn_mode_mvcc-enabling >` so that
95
96
``box.stat.memtx.tx().mvcc `` contained non-zero values.
96
97
97
- .. code-block :: lua
98
-
99
- box.cfg{memtx_use_mvcc_engine = true}
100
-
101
- We did it within the first ``box.cfg{} `` call to a new Tarantool instance,
102
- because the parameter ``memtx_use_mvcc_engine `` is non-dynamic.
103
-
104
- Next, we create a space with a primary index, and begin a transaction:
98
+ The next step is to create a space with a primary index and to begin a transaction:
105
99
106
100
.. code-block :: lua
107
101
@@ -115,7 +109,7 @@ Next, we create a space with a primary index, and begin a transaction:
115
109
box.space.test:replace{1, 1}
116
110
box.space.test:replace{2, 1}
117
111
118
- In the transaction above, we replaced three tuples by the `0 ` key:
112
+ In the transaction above, three tuples are replaced by the `0 ` key:
119
113
120
114
* ``{0, 0} ``
121
115
* ``{0, 'aa...aa'} ``
@@ -125,7 +119,7 @@ MVCC considers all these tuples as ``used`` since they belong to the current tra
125
119
Also, MVCC considers tuples ``{0, 0} `` and ``{0, 'aa..aa'} `` as ``retained `` because
126
120
they don't belong to any index (unlike ``{0, 1} ``), but they cannot be deleted yet.
127
121
128
- If we call ``box.stat.memtx.tx() `` now, we'll see something like this:
122
+ Calling ``box.stat.memtx.tx() `` now will bring something like this:
129
123
130
124
.. code-block :: tarantoolsession
131
125
:emphasize-lines: 33-39
0 commit comments