Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v3 0/2] Safe truncation and deletion
@ 2020-01-20 18:13 Ilya Kosarev
  2020-01-20 18:13 ` [Tarantool-patches] [PATCH v3 1/2] b-tree: return NULL on matras_alloc fail Ilya Kosarev
  2020-01-20 18:13 ` [Tarantool-patches] [PATCH v3 2/2] memtx: allow quota overuse for truncation and deletion Ilya Kosarev
  0 siblings, 2 replies; 27+ messages in thread
From: Ilya Kosarev @ 2020-01-20 18:13 UTC (permalink / raw)
  To: tarantool-patches; +Cc: v.shpilevoy

space:truncate() and space:delete() could fail on memory allocations
when reaching memtx_memory limit. As far as it is quite an ill
behaviour, it is fixed in this patchset through memtx quota strictness
adjustment. Now it can be overused if needed.
Also possible bps_tree_create_leaf NULL dereference issue is fixed.

Branch: https://github.com/tarantool/tarantool/tree/i.kosarev/gh-3807-safe-alloc-on-truncation
Issue: https://github.com/tarantool/tarantool/issues/3807

Changes in v2:
  Approach changed completely: now we are not trying to allocate
  service tuples in some safe way, but increasing memtx quota so
  that space:truncate() and space:delete() won't fail on allocation.

Changes in v3:
  Now we are not increasing memtx quota. Instead we just set a flag to
  allow quota overuse for space:truncate() and space:delete().

Ilya Kosarev (2):
  b-tree: return NULL on matras_alloc fail
  memtx: allow quota overuse for truncation and deletion

 src/box/box.cc           |  5 +++++
 src/box/memtx_engine.c   |  9 +++++++++
 src/box/memtx_engine.h   |  3 +++
 src/box/memtx_space.c    | 13 +++++++++----
 src/lib/salad/bps_tree.h |  7 +++++--
 src/lib/small            |  2 +-
 6 files changed, 32 insertions(+), 7 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2020-02-14 19:57 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20 18:13 [Tarantool-patches] [PATCH v3 0/2] Safe truncation and deletion Ilya Kosarev
2020-01-20 18:13 ` [Tarantool-patches] [PATCH v3 1/2] b-tree: return NULL on matras_alloc fail Ilya Kosarev
2020-01-21 10:32   ` Nikita Pettik
2020-01-31  8:18     ` Konstantin Osipov
2020-02-04 17:13       ` Nikita Pettik
2020-02-04 17:25         ` Konstantin Osipov
2020-02-04 18:08           ` Nikita Pettik
2020-02-04 18:25             ` Konstantin Osipov
2020-01-21 20:55   ` Vladislav Shpilevoy
2020-01-20 18:13 ` [Tarantool-patches] [PATCH v3 2/2] memtx: allow quota overuse for truncation and deletion Ilya Kosarev
2020-01-21 11:42   ` Nikita Pettik
2020-01-21 20:59     ` Vladislav Shpilevoy
2020-02-14 19:57       ` Ilya Kosarev
2020-01-31  8:21   ` Konstantin Osipov
2020-02-04 18:56     ` Ilya Kosarev
2020-02-04 20:06       ` Konstantin Osipov
2020-02-05 19:11         ` Ilya Kosarev
2020-02-05 19:17           ` Konstantin Osipov
2020-02-06 10:50             ` Ilya Kosarev
2020-02-06 14:29               ` Konstantin Osipov
2020-02-06 16:14                 ` Ilya Kosarev
2020-02-06 16:26                   ` Konstantin Osipov
2020-02-10  8:24                     ` Ilya Kosarev
2020-02-10  9:49                       ` Konstantin Osipov
2020-02-10 10:43                         ` Ilya Kosarev
2020-02-10 10:50                           ` Konstantin Osipov
2020-02-14 19:55                             ` Ilya Kosarev

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