Tarantool development patches archive
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix DML vs DDL race
@ 2019-03-23 21:07 Vladimir Davydov
  2019-03-23 21:07 ` [PATCH 1/4] vinyl: introduce hash of spaces affected by transaction Vladimir Davydov
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Vladimir Davydov @ 2019-03-23 21:07 UTC (permalink / raw)
  To: kostja; +Cc: tarantool-patches

In Vinyl a DML request may yield on disk read while still having a
pointer to the target space saved on stack. If the space is altered
during this time window, the DML request will most certainly crash
while trying to dereference the stale pointer when it resumes. The
solution is simple: abort all affected transactions whenever we delete
a space from the cache.

https://github.com/tarantool/tarantool/issues/3420
https://github.com/tarantool/tarantool/commits/dv/gh-3420-vy-abort-tx-in-ddl

NOTE the branch is based on top of

https://github.com/tarantool/tarantool/commits/dv/gh-4070-vy-fail-aborted-transactions-early

which was submitted for review earlier:

https://www.freelists.org/post/tarantool-patches/PATCH-12-vinyl-drop-useless-vy-read-viewis-aborted-flag
https://www.freelists.org/post/tarantool-patches/PATCH-22-vinyl-fail-aborted-transactions-early

Vladimir Davydov (4):
  vinyl: introduce hash of spaces affected by transaction
  vinyl: don't abort transactions that modify only local spaces for ro
  vinyl: abort affected transactions when space is removed from cache
  Revert "test: skip ddl test for vinyl on travis"

 rpm/tarantool.spec             |   2 -
 src/box/blackhole.c            |   1 +
 src/box/memtx_space.c          |   1 +
 src/box/schema.cc              |   3 ++
 src/box/space.c                |   6 +++
 src/box/space.h                |  15 ++++++
 src/box/sysview.c              |   1 +
 src/box/vinyl.c                |  33 ++++++++++---
 src/box/vy_point_lookup.c      |  14 ++++++
 src/box/vy_read_iterator.c     |  13 +++++
 src/box/vy_tx.c                |  45 ++++++++++++++---
 src/box/vy_tx.h                |  44 +++++++++++++++--
 test/vinyl/ddl.skipcond        |   6 ---
 test/vinyl/errinj_ddl.result   | 110 +++++++++++++++++++++++++++++++++++++++++
 test/vinyl/errinj_ddl.test.lua |  51 +++++++++++++++++++
 test/vinyl/misc.result         |  38 ++++++++++++++
 test/vinyl/misc.test.lua       |  16 ++++++
 17 files changed, 376 insertions(+), 23 deletions(-)
 delete mode 100644 test/vinyl/ddl.skipcond

-- 
2.11.0

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

end of thread, other threads:[~2019-03-28 14:12 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-23 21:07 [PATCH 0/4] Fix DML vs DDL race Vladimir Davydov
2019-03-23 21:07 ` [PATCH 1/4] vinyl: introduce hash of spaces affected by transaction Vladimir Davydov
2019-03-28 13:25   ` [tarantool-patches] " Konstantin Osipov
2019-03-28 13:58     ` Vladimir Davydov
2019-03-23 21:07 ` [PATCH 2/4] vinyl: don't abort transactions that modify only local spaces for ro Vladimir Davydov
2019-03-25  5:27   ` [tarantool-patches] " Георгий Кириченко
2019-03-25  8:13     ` Vladimir Davydov
2019-03-25  8:58       ` Георгий Кириченко
2019-03-25  9:30         ` Vladimir Davydov
2019-03-23 21:07 ` [PATCH 3/4] vinyl: abort affected transactions when space is removed from cache Vladimir Davydov
2019-03-25  5:26   ` [tarantool-patches] " Георгий Кириченко
2019-03-25  8:17     ` Vladimir Davydov
     [not found]       ` <1564677.EMV258VVK2@home.lan>
2019-03-25  9:51         ` Vladimir Davydov
2019-03-25  5:45   ` Георгий Кириченко
2019-03-25  8:21     ` Vladimir Davydov
2019-03-25  9:03       ` Георгий Кириченко
2019-03-28 13:45   ` [tarantool-patches] " Konstantin Osipov
2019-03-28 14:02     ` Vladimir Davydov
2019-03-28 14:12       ` Konstantin Osipov
2019-03-23 21:07 ` [PATCH 4/4] Revert "test: skip ddl test for vinyl on travis" Vladimir Davydov
2019-03-28 13:46   ` [tarantool-patches] " Konstantin Osipov

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