Skip to content

Commit 25afc52

Browse files
committed
integrate peer feedback
1 parent 314949f commit 25afc52

File tree

1 file changed

+6
-12
lines changed
  • doc/reference/reference_lua/box_stat

1 file changed

+6
-12
lines changed

doc/reference/reference_lua/box_stat/memtx.rst

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,13 @@ and multiversion concurrency control (``box.stat.memtx().tx.mvcc``).
8989

9090
**Example**
9191

92-
Let's get memory statistics for ``used`` tuples in a transaction.
92+
This example illustrates memory statistics for ``used`` tuples in a transaction.
9393

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
9596
``box.stat.memtx.tx().mvcc`` contained non-zero values.
9697

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:
10599

106100
.. code-block:: lua
107101
@@ -115,7 +109,7 @@ Next, we create a space with a primary index, and begin a transaction:
115109
box.space.test:replace{1, 1}
116110
box.space.test:replace{2, 1}
117111
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:
119113

120114
* ``{0, 0}``
121115
* ``{0, 'aa...aa'}``
@@ -125,7 +119,7 @@ MVCC considers all these tuples as ``used`` since they belong to the current tra
125119
Also, MVCC considers tuples ``{0, 0}`` and ``{0, 'aa..aa'}`` as ``retained`` because
126120
they don't belong to any index (unlike ``{0, 1}``), but they cannot be deleted yet.
127121

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:
129123

130124
.. code-block:: tarantoolsession
131125
:emphasize-lines: 33-39

0 commit comments

Comments
 (0)