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.
211
questions
0
votes
0
answers
42
views
How to migrate Tarantool tables in the presence of foreign keys?
I want to migrate a Tarantool table to a different format. Currently (Tarantool 2.8), this must be done manually, by creating a new table, copying the data over, dropping the old table and renaming ...
0
votes
0
answers
75
views
Upload data from postgres to tarantool dynamically
I need to upload data from postgres to tarantool dynamically.
For example, I have tarantool entity TestEntity (@Tuple(test_t)) with TestRepository which extends TarantoolRepository
I can write sql ...
1
vote
1
answer
35
views
Communication between to goland services
I need to organize the communication between two goland services but have some problems
func main() {
ctxWithCancel, cancel := context.WithCancel(context.Background())
sig := make(chan os....
0
votes
0
answers
24
views
How to view/check data distribution among vshards
I've inserted 100000 test rows/tuples into out the box tarantool/cartridge (router, 2 replicas of 2 hosts each, 15000 buckets).
How could I inspect the data distribution? The number of rows in a ...
1
vote
1
answer
58
views
Tarantool Error - Procedure 'vshard.storage.buckets_count' is not defined
I'm trying to initialize a router and I get this error.
Procedure 'vshard.storage.buckets_count' is not defined
All respose:
response screen shote
I also do not have buckets. What could be the ...
0
votes
0
answers
113
views
What is the best way to upload large data set to tarantool
I have defined a simple table in Tarantool and I'm trying to fulfil it with 1 millions of record. I'm using a c# code with progaudi.tarantool library. I'm using two approaches:
box.ExecuteSql(/*My ...
0
votes
1
answer
31
views
How do I compare arrays or box.tuple objects In Tarantool?
Might be a novice question, but still. How do I compare arrays or box.tuple objects In Tarantool? I need to check if their values are equal?
1
vote
1
answer
161
views
when selecting data from the storage, an exception is thrown 'Procedure 'ddl.get_schema' is not defined'
I created the users space:
s = box.schema.space.create('users')
s:format({
> {name = 'id', type = 'unsigned'},
> {name = 'user_name', type = 'string'},...
0
votes
1
answer
116
views
How to query from "any"/"map" data type on Tarantool?
Following example from this answer. If I created map without index, how to query the inner value of the map?
box.schema.create_space('x', {format = {[1] = {'id', 'unsigned'}, [2] = {'obj', 'map'}}})
...
1
vote
1
answer
97
views
Tarantool cartridge-springdata(spring data for tarantool) does not work when language is kotlin
We want to use tarantool in out project that is based on kotlin language and spring framework so we tried the spring-data project for tarantool which is cartridge-springdata. The example explained in ...
1
vote
2
answers
177
views
How to mass upsert on Tarantool?
In MySQL I can do something like this:
-- post_id-user_id is unique pair
INSERT INTO userviews(post_id, user_id, view_count)
VALUES(1,1,1),(2,1,1),(3,1,1),(4,1,1)
ON DUPLICATE KEY UPDATE
view_count =...
1
vote
1
answer
110
views
Is Tarantool just a cache?
Like the title says - is it just a cache? What about persistence? What about storing on disk?
A lot of times there can be a wrong idea that Tarantool is just a different version of Memcached.
5
votes
1
answer
500
views
When to Redis? When to Tarantool?
I do not want to get a detailed comparison. Neither do I want to define 'what is the best or fastest' in-memory DB.
They are both similar, so I want to get an overview of critical differences.
So what ...
3
votes
1
answer
110
views
Running SQL queries in Tarantool from Go are silent (no errors)
I try to run SQL queries from a Golang application using the official Tarantool client. The only way I know how to do it is by using conn.Eval like below. But I don't receive any errors. I can drop ...
1
vote
1
answer
71
views
PostgreSQL's JSONB-like indexable column in Tarantool?
In PostgreSQL we can create a JSONB column that can be indexed and accessed something like this:
CREATE TABLE foo (
id BIGSERIAL PRIMARY KEY
-- createdAt, updatedAt, deletedAt, createdBy, ...
1
vote
1
answer
48
views
Kubernetes. Is it possible one release in two namespaces?
We have tarantool in the Kubernetes cluster. One of tarantool's part has big in size. We need to be able to manage this separately from the main release.
Our idea is to divide by two namespaces. Is it ...
1
vote
1
answer
49
views
How to copy specific columns from one table to another in Tarantool
I have 2 tables, for example:
table X, columns:
A integer
B string
C number
table X2, columns:
A integer
C number
how to copy contents of X to X2 (excluding the missing columns) in Tarantool?
...
2
votes
1
answer
51
views
Why does my Tarantool Cartridge retrieve data from router instance sometimes?
I wonder why my tarantool cartridge cluster is not woring as it should.
I have a cartridge cluster running on kubernetes and cartridge image is generated from cartridge cli cartridge pack, and no ...
0
votes
1
answer
57
views
Evolving Tarantool instance
What should we do if we have one tarantool instance (without Cartridge or VShard), then sometimes in the future we need to replicate it to another machine without downtime?
or if it's the easiest way ...
0
votes
1
answer
41
views
Tarantool storage lock warnings when call multiple get/update of the same row
I have a vinyl space with some entities, that are linked between themselves by some application logic. Insert/update of any entity needs some calculations and update of linked entities too.
Let's say ...
2
votes
3
answers
107
views
How to get query timing in Tarantool like in other DBMS
In MySQL/PostgreSQL/Oracle/MSSQL there's always duration in every query executed "Query completed in 0.23ms" or "Elapsed 0.001s" or at least when "EXPLAIN" or "...
0
votes
1
answer
194
views
How to recover Tarantool docker when computer crashed?
I got this when starting tarantool using docker compose:
tarantool_1 | Loading existing configuration file: /etc/tarantool/config.yml
tarantool_1 | Config:
tarantool_1 | ---
tarantool_1 | ...
1
vote
1
answer
110
views
How to convert vinyl to memtx in tarantool?
I've created a table in vinyl engine (disk), how can I convert it to memtx engine (ram)?
I have some small table that would be better if it converted to memtx for something like this:
WITH x AS ( -- ...
0
votes
2
answers
198
views
How to get tarantool version from command line interface?
I can get tarantool client version using this command:
$ tarantool --version
Tarantool 2.5.2-50-g0cb9a4bba
but how can I get the tarantool server version inside the terminal?
tarantoolctl connect ...
0
votes
1
answer
160
views
tarantoolctl installation cartridge-cli && vshard
after installing tarantool, I need to install cartridge-cli and vshard
when the Internet is connected, I did it from under the tarantool user:
tarantoolctl rocks install cartridge-cli
tarantoolctl ...
1
vote
1
answer
70
views
How to make sqrt and cos available in tarantool SQL?
I'm trying to estimate a distance using this formula, but when I try to execute it in tarantool sql
box.execute [[SELECT "weight" + sqrt( cos("lat" - 12.31252) * ...]]
it shows:
...
0
votes
1
answer
50
views
How I can get hash from random tuple or array in Tarantool?
I have a function(random_typle) parametr as a random tuple, so how can I get a hash from all fields of a tuple?
Can I use something like tuple:bsize() or should iterate all fields and calc hash?
2
votes
1
answer
90
views
How to call C functions from SQL in Tarantool?
How can I call a C-function from SQL in Tarantool?
Documentation says:
C functions are imported from .so files
But where shall I specify the reference to my .so file?
It would be great to see an ...
0
votes
1
answer
76
views
Get 1 random record from Tarantool space
I have query with 2 conditions which return 1 record every request 1by1 as inserted in space
box.space.extensions.index.secondary:select(
{city, 0},
{limit=1}
)
Sample:
{1}
{2}
{3}...
4
votes
1
answer
117
views
Space that is available at all Tarantool nodes (vshard)
I use Tarantool with vshard module. When bucket_id is set, the data is distributed across the cluster. Each node has its own set of bucket_ids. How to make a space so that it is fully accessible on ...
0
votes
2
answers
60
views
I am getting this error while replicating from mysql to Tarantool these are replicator logs
[2020-11-02 14:49:40] I Connected to Tarantool at 127.0.0.1:3301
[2020-11-02 14:49:41] I Tarantool reported null binlog position. Dumping tables...
[2020-11-02 14:49:41] E Error in reading binlogs: ...
1
vote
2
answers
172
views
How to config Tarantool Cartridge cluster automatically?
I have an application developed on Tarantool Cartridge. My cluster consists of 12 Tarantool instances divided through 4 replica sets (some are routers, some are storages). Now starting setup this ...
0
votes
1
answer
48
views
Q: How to change cluster_cookie in bootstrapped Tarantool Cartridge cluster?
Is there any way to change cluster_cookie in already bootstrapped cluster?
Should I just set new cartridge.cfg.cluster_cookie and reboot Tarantool instances or some additional actions are required?
2
votes
1
answer
82
views
What is the good practice to use graylog with tarantool?
Currently our application uses tarantool provided log module, but was looking for a way to collect the logs into graylog. What is the best way to do so?
1
vote
1
answer
63
views
Tarantool blocks for operations, if error occurs inside box.begin()...box.commit() block
If error occurs inside box.begin()...box.commit() block, Tarantool box blocks for operations untill you manually execute box.commit()
For example, I provide incorrect data without one of fields to my ...
0
votes
1
answer
58
views
How to setup cartridge applications replication between few Tarantool routers?
How to setup cartridge applications replication between few Tarantool routers on different phisical/virtual servers?
1
vote
2
answers
100
views
Using Tarantool http as Nginx upstream server - got error 13: Permission denied
Have Nginx
yum install Nginx
Have Tarantool + Cartridge
nginx.conf
upstream tarantool_httpd {
server 172.16.72.18:8082 max_fails=1 fail_timeout=15s;
keepalive 32;
}
server {
listen ...
3
votes
1
answer
84
views
How to minimize HDD usage in tarantool
I have installed tarantool on a Raspberry Pi 7inch and would like to minimize its interaction with the HDD (sd card).
Are there any simple ways to do this.
What will be the real usage of hdd?
5
votes
1
answer
249
views
How to see print() results in Tarantool Docker container
I am using tarantool/tarantool:2.6.0 Docker image (the latest at the moment) and writing lua scripts for the project. I try to find out how to see the results of callin' print() function. It's quite ...
0
votes
1
answer
89
views
icu_date gives an error message attempt to index a number value
I want to use the icu_date library, but when I try to insert a value, an error appears
icu_date = require("icu-date")
format_date = icu_date.formats.iso8601()
end_time = icu_date.now()
...
3
votes
1
answer
103
views
What is more efficient (Tarantool) - many spaces or one big space?
I am implementing microservice on Tarantool vinyl database and need to make basic architecture decision - should I use one big space for all the data, or use many spaces with same tuple format.
The ...
0
votes
1
answer
33
views
How to get 1 record in Tarantool DB with uniq ganantee?
I have table in DB my_table_ext [ID, CITY_ID, CTN, EXT, InUse]
Have data in
{1,'City1','001','1234',0}
{2,'City1','001','3456',0}
In MSSQL i have this SQL code to return unique record with update ...
1
vote
1
answer
133
views
Custom response from Tarantool + Nginx
Have instance: Nginx in DMZ with TNT_nginx_upstream_module + Tarantool Cartridge as API server.
When i have response with good result - it's 200 OK + JSON with data
How to set other response?
400 ...
0
votes
1
answer
92
views
Connect Tarantool Docker image to Postgres
I'm trying to connect Tarantool Docker Image to local PostgreSQL, to replicate some test data, and ran into the following problems:
It seems there is no CL (except Tarantool console) to check which
...
0
votes
1
answer
48
views
Cartrige instances.yml file
What do these fields mean, and what should I put there for my app?
cartridge:
cluster_cookie: ""
replication_connect_quorum: 1
cartridge.srv-1:
workdir: dev/3301
...
5
votes
1
answer
442
views
Tarantool does not start due to disk write error
I am trying to launch Tarantool in Docker from scratch (no existing data). I use the Docker command they suggest in the Tutorial and run it under Docker Desktop 2.4.0.0 on MacOS 10.15.6 (Catalina):
...
1
vote
1
answer
123
views
Can I yield during an transaction in Tarantool?
I'm curious about yielding during a transaction. Will it be interrupted immediately? Or will other fibers be able to read changes that have not yet been committed?
I've overlooked the documentation ...
0
votes
1
answer
177
views
How to remove a field in Tarantool space?
I have field in tarantool space I no longer need.
local space = box.schema.space.create('my_space', {if_not_exists = true})
space:format({
{'field_1', 'unsigned'},
{'field_2', '...
1
vote
1
answer
119
views
How to implement pagination for multikey indexes in Tarantool?
I have multikey index over field that store an array of integers.
How I can implement cursor-based pagination using it?
In real if tuple has more than one value in array field it tuple will be ...
0
votes
1
answer
77
views
How to make a fault tolerant Tarantool cluster
I have a cluster consisting of a master node and several replicas. I want, if the master or the hosting suddenly falls down, to have the possibility to perform a quick switchover and everything works ...