tarantool

What is the default password for connecting to tarantool cartridge application

爱⌒轻易说出口 提交于 2020-06-14 06:18:10
问题 I have a default application on tarantool cartridge (cluster). I want to connect to the cluster's router. I use the command: tarantoolctl connect admin:_password_@localhost:3301 Where can I find the default password? 回答1: In cartridge it is called cluster_cookie . You may find the default one here. If you've created your project using cartridge-cli tool it would depend on your project name: ... cluster_cookie = '${project_name_lower}-cluster-cookie' ... And you can manipulate its value from

When to use fibers and when to use co-routines in Tarantool?

独自空忆成欢 提交于 2020-01-14 08:44:51
问题 In Tarantool, are fibers used when the Lua code author wants Tarantool to schedule the execution? Are co-routines (in the Tarantool/LuaJIT process) used when the Lua code author wants to be in control of the execution? 回答1: In Tarantool, fibers are synonymous with coroutines. The fibers are more integrated to Tarantool I/O etc, you should use them instead of lua coroutines. We suggest you always use our fibers, rather than Lua coroutines, since they are more powerful. Our entire I/O stack is

Tarantool sphia make slow selects?

百般思念 提交于 2019-12-13 06:09:23
问题 Use tarantool version: Tarantool 1.6.8-586-g504e151 It installed from epel. I use tarantool on sphia mode: log_space = box.schema.space.create('logs', { engine = 'sophia', if_not_exists = true } ) log_space:create_index('primary', { parts = {1, 'STR'} } ) I have 500.000 records and make select request: box.space.logs:select({'log_data'}) it takes aboute 1min. Why so slow ? unix/:/var/run/tarantool/g_sofia.control> box.stat() —- - DELETE: total: 0 rps: 0 SELECT: total: 587575 rps: 25 INSERT:

Conflict resolution in Tarantool (how to fix replication in master-master mode in case of conflicts)

隐身守侯 提交于 2019-12-12 19:00:40
问题 How can I implement resolution of conflicts when I use Tarantool in multi master scenario? I'm developing a service which should be highly available, so decided to use nginx as a load balancer (with backup directive) for two nodes of tarantool (with disabled read only option). It retries failed requests to other node, but in case of network issues (for instance, between nodes of tarantool) conflicts may occur. How can I implement one of the following scenarios: Choose a newer tuple on each

Nullable unique compound index in Tarantool

∥☆過路亽.° 提交于 2019-12-11 16:53:08
问题 How to create unique nullable compound index in Tarantool 1.10 ? I have a space of 4 columns: | id | user_id | type | {some data} | The pair | user_id | type | should be unique if type column is not null. user_id should never be null. Examples: OK: | 1 | 1 | 1 | | 2 | 1 | 2 | | 3 | 2 | 1 | OK: | 1 | 1 | 1 | | 2 | 1 | 2 | | 3 | 1 | NULL | | 4 | 1 | NULL | | 5 | 2 | 1 | NOT OK: | 1 | 1 | 1 | | 2 | 1 | 1 | | 3 | 1 | NULL | NOT OK: | 1 | 1 | 1 | | 2 | NULL | <any> | 来源: https://stackoverflow.com

Select from Tarantool by composite index with different iterators

↘锁芯ラ 提交于 2019-12-11 15:29:55
问题 I have space peoples : id name age with two indexes: peoples = box.schema.space.create('peoples', {engine = 'memtx', field_count = 3, if_not_exists = true}) peoples:create_index('primary', {type = 'TREE', unique = true, parts = {1, 'unsigned'}, if_not_exists = true}) peoples:create_index('by_name_age', {type = 'TREE', unique = false, parts = {2, 'STR', 3, 'unsigned'}, if_not_exists = true}) and with data: peoples:auto_increment{ 'name_1', 10 } peoples:auto_increment{ 'name_1', 11 } peoples

Spatial search for neighbor with distance limit?

自闭症网瘾萝莉.ら 提交于 2019-12-11 05:31:05
问题 In the example page it is shown how to do a neighbor search with a limit on the number of returned items. Is it possible to also specify a distance limit? I.e.: Return all items that are at most X distance from the point, and further limit the result to Y number of items." 回答1: No, if you need distance, use OVERLAPS. https://tarantool.org/doc/book/box/box_index.html#rtree-iterator 来源: https://stackoverflow.com/questions/39644902/spatial-search-for-neighbor-with-distance-limit

How i can perform request to tarantool like in mysql?

回眸只為那壹抹淺笑 提交于 2019-12-08 01:19:59
问题 I need select from tarantool all datat by two values from one space. How i can perform request to tarantool like in mysql? select from aaa where a=1a22cadbdb or a=7f626e0123 Now i can make two requests: box.space.logs:select({'1a22cadbdb'}) box.space.logs:select({'7f626e0123'}) but i don't know how to merge result into one ;( 回答1: Following code merge field[0] to lua table a = box.space.logs:select({'1a22cadbdb'}) b = box.space.logs:select({'7f626e0123'}) c = { field_1 = a[0], field_2 = b[0]