Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

创建表格的时候配置全局索引报错 #26

Open
bangquanwu opened this issue Jun 25, 2019 · 3 comments
Open

创建表格的时候配置全局索引报错 #26

bangquanwu opened this issue Jun 25, 2019 · 3 comments

Comments

@bangquanwu
Copy link

bangquanwu commented Jun 25, 2019

err : { 403:
OTSOperationForbidden4You are forbidden to do this operation: CreateTable.
at Request.extractError (E:\pro\nc-draw\node_modules_tablestore@4.3.2@tablestore\lib\client.js:92:44)
at Request.callListeners (E:\pro\nc-draw\node_modules_tablestore@4.3.2@tablestore\lib\sequential_executor.js:113:20)
at Request.emit (E:\pro\nc-draw\node_modules_tablestore@4.3.2@tablestore\lib\sequential_executor.js:81:10)
at Request.emit (E:\pro\nc-draw\node_modules_tablestore@4.3.2@tablestore\lib\request.js:189:14)
at Request.transition (E:\pro\nc-draw\node_modules_tablestore@4.3.2@tablestore\lib\request.js:57:10)
at AcceptorStateMachine.runTo (E:\pro\nc-draw\node_modules_tablestore@4.3.2@tablestore\lib\request.js:24:12)
at E:\pro\nc-draw\node_modules_tablestore@4.3.2@tablestore\lib\request.js:36:10
at Request. (E:\pro\nc-draw\node_modules_tablestore@4.3.2@tablestore\lib\request.js:73:9)
at Request. (E:\pro\nc-draw\node_modules_tablestore@4.3.2@tablestore\lib\request.js:191:12)
at Request.callListeners (E:\pro\nc-draw\node_modules_tablestore@4.3.2@tablestore\lib\sequential_executor.js:90:20)

createTable参数:

{
    tableMeta: {
      tableName: 'user',
      primaryKey: [ { name: '$username', type: TableStore.PrimaryKeyType.STRING}],
      definedColumn: [{ name: 'password', type: TableStore.DefinedColumnType.DCT_STRING}]
    },
    reservedThroughput: {
      capacityUnit: {
        read: 0,
        write: 0
      }
    },
    tableOptions: {
      timeToLive: -1,// 数据的过期时间, 单位秒, -1代表永不过期. 假如设置过期时间为一年, 即为 365 * 24 * 3600.
      maxVersions: 1// 保存的最大版本数, 设置为1即代表每列上最多保存一个版本(保存最新的版本).
    },
    streamSpecification: {
      enableStream: false, //globalIndex不支持开启Stream
    },
    indexMetas: [
      {
        name: 'indexaa',
        primaryKey: ['$username'],
        definedColumn: ['password']
      }
    ]
  }

实现目标是创建表格的同时生成全局索引
权限是管理员权限,可以操作阿里云所有资源,参数去掉indexMetas属性可以正常创建表格

@bangquanwu bangquanwu changed the title 创建表的时间添加配置全局索引报错 创建表格的时候配置全局索引报错 Jun 25, 2019
@bangquanwu
Copy link
Author

@cf @boxiaowpl @wangtantan 各位老师能不能帮忙看下问题

@Dehuali
Copy link

Dehuali commented Sep 25, 2019

我也是索引出问题,这么久都没有人管。。。

@wangtantan-zz
Copy link
Contributor

您好,这个问题是由于你们有开通二级索引造成的,二级索引是实例级别开通的,目前尚未对所有实例默认开启。请加入公开交流群,联系技术支持同学开通
交流群1:11789671
交流群2:23307953

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants