我有带有分片模块和空间配置的 Tarantool,如下所示:
local h_box = box.schema.create_space('hotbox')
h_box:create_index('one', {type = 'hash', parts = {1, 'string'}})
h_box:create_index('two', {type = 'tree', parts = {2, 'string'}})
h_box:create_index('three', {type = 'tree', parts = {3, 'unsigned'}})
h_box:create_index('four', {type = 'tree', parts = {4, 'boolean'}})
h_box:create_index('five', {type = 'tree', parts = {5, 'unsigned'}})
h_box:create_index('six', {type = 'tree', parts = {6, 'boolean'}})
没有主键的 shard.T:select{} 请求将搜索所有分片。
但是当我尝试调用它时看到错误。
shard.h_box:select{}
---
- error: 'builtin/digest.lua:138: Usage digest.crc32(string)'
...
另外,当我调用shard.h_box:secondary_select{2, {limit = 10}, 'foo'}
Tarantool 时,会抛出一个错误:
---
- error: '/usr/share/tarantool/shard/init.lua:1015: attempt to index field ''conn''
(a nil value)'
...
如何从所有分片中获取所有数据并将选择调用到二级索引?