Tarantool development patches archive
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Follow-up on async memtx index cleanup
@ 2018-05-22 17:25 Vladimir Davydov
  2018-05-22 17:25 ` [PATCH v2 1/2] memtx: rework background garbage collection procedure Vladimir Davydov
  2018-05-22 17:25 ` [PATCH v2 2/2] memtx: run garbage collection on demand Vladimir Davydov
  0 siblings, 2 replies; 7+ messages in thread
From: Vladimir Davydov @ 2018-05-22 17:25 UTC (permalink / raw)
  To: kostja; +Cc: tarantool-patches

Turned out that after commit 2a1482f33fa0 ("memtx: free tuples
asynchronously when primary index is dropped"), we can't merge
1.10 to 2.0 without breaking tests, because one of the tests
(namely sql-tap/gh-3083-ephemeral-unref-tuples) executes a lot
of SQL SELECT statements without yielding. Those statements
in turn create a lot of ephemeral spaces that consume all
available memory since memtx garbage collection doesn't have
a chance to clean up. To fix that, this patch set improves
the garbage collection procedure: now it is invoked not only
by a background fiber, but also on demand, i.e. when any of
memtx functions fails to allocate memory.

https://github.com/tarantool/tarantool/issues/3408
https://github.com/tarantool/tarantool/commits/memtx-run-gc-on-demand

Changes in v2:
 - Patches 1-6 pushed with minor changes. Patches 7-8 => Patches 1-2.
 - Add gc task vtab to separate task destruction from gc callback.
 - Return gc task state in an argument.

v1: https://www.freelists.org/post/tarantool-patches/PATCH-08-Followup-on-async-memtx-index-cleanup

Vladimir Davydov (2):
  memtx: rework background garbage collection procedure
  memtx: run garbage collection on demand

 src/box/index.cc       |  7 ++++++-
 src/box/memtx_engine.c | 54 +++++++++++++++++++++++++++++++++++++++++++-------
 src/box/memtx_engine.h | 17 +++++++++++++---
 src/box/memtx_hash.c   | 35 ++++++++++++++++++++++----------
 src/box/memtx_hash.h   |  1 +
 src/box/memtx_tree.c   | 38 ++++++++++++++++++++++++-----------
 src/box/memtx_tree.h   |  1 +
 7 files changed, 119 insertions(+), 34 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-05-24  6:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-22 17:25 [PATCH v2 0/2] Follow-up on async memtx index cleanup Vladimir Davydov
2018-05-22 17:25 ` [PATCH v2 1/2] memtx: rework background garbage collection procedure Vladimir Davydov
2018-05-23 17:56   ` Konstantin Osipov
2018-05-24  6:13     ` Vladimir Davydov
2018-05-22 17:25 ` [PATCH v2 2/2] memtx: run garbage collection on demand Vladimir Davydov
2018-05-23 17:58   ` Konstantin Osipov
2018-05-24  6:15     ` Vladimir Davydov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox