我正在跟踪tarantool文档,但是在创建索引时会出现一个错误。
我想了解为什么这是失败的,因为我是完全遵循本教程。
$ tarantool
tarantool: version 1.6.7-591-g7d4dbbb
type 'help' for interactive help
tarantool> box.cfg{listen = 3301}
2017-12-06 20:57:18.684 [15168] main/101/interactive C> version 1.6.7-591-g7d4dbbb
2017-12-06 20:57:18.684 [15168] main/101/interactive C> log level 5
2017-12-06 20:57:18.684 [15168] main/101/interactive I> mapping 1073741824 bytes for tuple arena...
2017-12-06 20:57:18.705 [15168] main/101/interactive I> initializing an empty data directory
2017-12-06 20:57:18.710 [15168] snapshot/101/main I> creating `./00000000000000000000.snap.inprogress'
2017-12-06 20:57:18.710 [15168] snapshot/101/main I> saving snapshot `./00000000000000000000.snap.inprogress'
2017-12-06 20:57:18.710 [15168] snapshot/101/main I> done
2017-12-06 20:57:18.713 [15168] iproto I> binary: started
2017-12-06 20:57:18.713 [15168] iproto I> binary: bound to 0.0.0.0:3301
2017-12-06 20:57:18.713 [15168] main/101/interactive I> ready to accept requests
---
...
tarantool> s = box.schema.space.create('tester')
2017-12-06 20:57:32.803 [15168] wal/101/main I> creating `./00000000000000000000.xlog.inprogress'
---
...
tarantool> s:create_index('primary', {
> type = 'hash',
> parts = {1, 'unsigned'}
> })
---
- error: 'Can''t create or modify index ''primary'' in space ''tester'': unknown field
type'
...发布于 2017-12-06 21:11:10
你在使用Tarantool 1.6所以我认为你应该
parts = {1, 'NUM'}在本教程示例中。您显示的代码(“未签名”)为1.7,因此,一个选项是升级您的Tarantool版本。同样在docs中,您可以在右上角的Tarantool 1.6、1.7和1.8之间进行更改.
https://stackoverflow.com/questions/47682642
复制相似问题