Skip to content
Snippets Groups Projects
user avatar
Vladimir Davydov authored
Currently, to force dumping all in-memory trees, box.snapshot()
increments scheduler->generation directly. If dump is in progress and
there's a space that has more than one index and all its secondary
indexes have been dumped by the time box.snapshot() is called and its
primary index is being dumped, incrementing the generation will force
the scheduler to start dumping secondary indexes of this space again
(provided, of course, the space has fresh data). Then, creating a dump
task for a secondary index will attempt to pin the primary index - see
vy_task_dump_new() => vy_scheduler_pin_index() - which will crash,
because the primary index is being dumped and hence can't be removed
from the scheduler by vy_scheduler_pin_index():

  Segmentation fault
  #0  0x40c3a4 in sig_fatal_cb(int)+214
  #1  0x7f6ac7981890 in ?
  #2  0x4610bd in vy_scheduler_remove_index+46
  #3  0x4610fe in vy_scheduler_pin_index+49
  #4  0x45f93e in vy_task_dump_new+1478
  #5  0x46137e in vy_scheduler_peek_dump+282
  #6  0x461467 in vy_schedule+47
  #7  0x461bf8 in vy_scheduler_f+1143

To fix that let's trigger dump (by bumping generation) only from the
scheduler fiber, from vy_scheduler_peek_dump(). The checkpoint will
force the scheduler to schedule dump by setting checkpoint_in_progress
flag and setting checkpoint_generation.

Closes #2508
dbfd515f
History

Tarantool

Build Status Code Coverage Telegram Slack Gitter Google Groups

http://tarantool.org

Tarantool is an in-memory database and application server.

Key features of the application server:

  • 100% compatible drop-in replacement for Lua 5.1, based on LuaJIT 2.1. Simply use #!/usr/bin/tarantool instead of #!/usr/bin/lua in your script.
  • full support for Lua modules and a rich set of own modules, including cooperative multitasking, non-blocking I/O, access to external databases, etc

Key features of the database:

  • MsgPack data format and MsgPack based client-server protocol
  • two data engines: 100% in-memory with optional persistence and a 2-level disk-based B-tree, to use with large data sets
  • multiple index types: HASH, TREE, RTREE, BITSET
  • asynchronous master-master replication
  • authentication and access control
  • the database is just a C extension to the app server and can be turned off

Supported platforms are Linux/x86 and FreeBSD/x86, Mac OS X.

Tarantool is ideal for data-enriched components of scalable Web architecture: queue servers, caches, stateful Web applications.

To download and install Tarantool as a binary package for your OS, please visit https://tarantool.org/download.html.

To build Tarantool from source, see detailed instructions in the Tarantool documentation at https://tarantool.org/doc/dev_guide/building_from_source.html.

Please report bugs at http://github.com/tarantool/tarantool/issues We also warmly welcome your feedback in the discussion mailing list, tarantool@googlegroups.com.

Thank you for your interest in Tarantool!