【发布时间】:2023-03-31 05:39:02
【问题描述】:
我做了自增索引:
box.space.metric:create_index('primary', {
parts = {{'id', 'unsigned'}},
sequence = true,
})
然后我尝试在 id 字段中传递 nil:
metric.id = nil
当我尝试插入这些值时,我发现错误:
Tuple field 1 type does not match one required by operation: expected unsigned
我必须为自动增量字段传递什么值?
第二个问题。如果我使用很少实例的 tarantool-cluster(例如基于盒式应用程序),是否证明使用自动增量索引?会不会出现不同实例上会有重复键的情况?
【问题讨论】:
标签: tarantool