Questions tagged [tarantool]

Tarantool is a Lua application server with a built-in database. It's best to think of as a Redis or Memcached with high level of customization. Alternatively, it's Node.JS with object persistency and master-master replication.

Tarantool is a Lua application server with a built-in database.

The key idea is in a new way of building Web applications - a data grid approach, when the database serves as the application backend as well, and there are many database instances running in parallel, to scale up and out.

Tarantool features:

  • a drop-in replacement for Lua 5.1, based on LuaJIT 2.0; simply use #!/usr/bin/tarantool instead of #!/usr/bin/lua in your script
  • Lua packages for non-blocking I/O, fibers and HTTP
  • document data model with secondary keys
  • two data engines: 100% in-memory with optional persistence and a 2-level disk-based B-tree, to use with large data sets
  • iteration over data in forward and reverse order
  • asynchronous master-master replication
  • authentication and access control
218 questions
1
vote
2 answers

Select from tarantool using multiple conditions

How do i make a select with conditions with two or more fields from one space at once? I didn't find an example in the documentation.
1
vote
2 answers

Tarantool existing space migration

I need to add a parameter to existing space and keep the existing data. space is created like this: function create_user() local space = box.schema.create_space('user', { engine = 'memtx' }) space:format({ { name = 'user_id', type =…
1
vote
1 answer

Import Big CSV File Into Tarantool

I am looking for a way to insert big CSV (millions of rows and 20-30 fields) into tarantool db in a fastest way possible preferably through one of the connectors (python or c#) and access the space later within the application built with…
user1390638
  • 180
  • 2
  • 8
1
vote
2 answers

Is there a way in Tarantool to check state of tuple before performing update (optimistic lock check / CAS pattern)?

I try to find information about way to implement optimistic locks in Tarantool DB. This case doesn't covered in documentation so I can't get possible way for such action. My goal is to find a way to resolve potential data collisions for concurent…
cgi
  • 190
  • 1
  • 8
1
vote
1 answer

How to get max value of one field from index with condition on another part

Let's suppose that i have space with tree indexes on field 1, 2 and {1,2} with following tuples: [1, 1] [2, 1] [3, 1] [4, 2] [5, 2] [6, 2] [7, 3] [8, 3] [9, 3] what is the fastest way to retrieve tuple with max value of field 1 and where field 2…
1
vote
1 answer

How can i run tarantool 2.3.1 with the snapshot from tarantool 1.10.3

Circumstances: For 3 years there is an application, that uses tarantool (now it is 1.10.3), and once upon a time we've decided to move it to Kubernetes and replace old and ugly dockerfile, based on Jessie to the official image…
NechaevKO
  • 13
  • 4
1
vote
1 answer

Is it possible to save data in both vinyl and memtx at the same time?

In my project I want to store some data in fast storage, but some data is too large to be stored in RAM. Can I store some data in memtx and some in vinyl?
vvzvlad
  • 11
  • 2
1
vote
1 answer

What is the difference between len() and count() for the Vinyl engine?

I have different results for space:len() and space:count() for a space with a vinyl engine. What do these methods return?
1
vote
1 answer

How to insert UUID in Tarantool using go-tarantool?

Tarantool now has a built-in type UUID. How to insert a record and pass this field using https://github.com/tarantool/go-tarantool? For now I have this: Tuple field 1 type does not match one required by operation: expected uuid (0x17) when trying…
Sergey
  • 19,487
  • 13
  • 44
  • 68
1
vote
1 answer

tarantool how to handle lua errors outside the fiber

I am wondering, how can i set callback on fiber error throw. example: local fiber = require("fiber") local status = 0 --in my case stored in db local function time_consuming() lua_error status = 0 end function external_api_function() …
Vasil
  • 45
  • 5
1
vote
1 answer

How to generate a secure id for a session at least 256 bits long using Tarantool?

Tarantool must return a string of 256 bits for example: 40ee6e5a8195284884215c2fcd476a4e4ad9a65adde8eea3efcc15b93fb44d65
Andrew Nodermann
  • 610
  • 8
  • 13
1
vote
1 answer

How to perform a client-side full scan in Tarantool?

I need to consistently iterate over entire space in my application. Currently I'm using batches (e.g. classic limit-offset approach), but it can't be done in one transaction and will be inconsistent (e.g. remove from subset of already read tuples…
Ernado
  • 641
  • 1
  • 6
  • 14
1
vote
1 answer

get curren value of box.sequence in tarantool

I got sequence current value 3 localhost:3401> box.sequence.S:next() --- - 3 ... I can't find current value in the object localhost:3401> box.sequence.S --- - step: 1 id: 1 min: 1 cache: 0 uid: 1 max: 9223372036854775807 cycle: false …
Vasil
  • 45
  • 5
1
vote
1 answer

Tarantool fiber behavior with fiber.yield() and fiber.testcancel()

I ran into an unexpected behavior while building Tarantool app based on fibers. Simple reproducer of my code looks like this: local log = require('log') local fiber = require('fiber') box.cfg{} local func = function() for i = 1, 100000 do …
1
vote
2 answers

Tarantool broadcast call

I have cluster with several replicasets. I want to call some stored function on all nodes without calculate bucket_id, and after to map results. How should I do it?
Gennady
  • 352
  • 2
  • 12