Skip to content

CreateTable导致panic,建议做错误检查,返回error,直接运行时panic不妥当 #81

@swzry

Description

@swzry

`
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7509e5]

goroutine 1 [running]:
github.com/aliyun/aliyun-tablestore-go-sdk/tablestore.(*TableStoreClient).CreateTable(0xc000122000, 0xc0000cbeb0, 0x4, 0x4, 0x5)
D:/GoLang/GoWork/src/github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/api.go:348 +0x965
main.CreateTable(0xc000122000, 0x31, 0x84e146)
D:/GoLang/GoWork/src/local_no_vcs/OTSTest202103040238/main.go:42 +0x5ef
main.main()
D:/GoLang/GoWork/src/local_no_vcs/OTSTest202103040238/main.go:17 +0xad
`

相关的上下文(github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/api.go 348行附近):
`
346 req.ReservedThroughput = new(otsprotocol.ReservedThroughput)
347 req.ReservedThroughput.CapacityUnit = new(otsprotocol.CapacityUnit)
348 req.ReservedThroughput.CapacityUnit.Read = proto.Int32(int32(request.ReservedThroughput.Readcap))
349 req.ReservedThroughput.CapacityUnit.Write = proto.Int32(int32(request.ReservedThroughput.Writecap))

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions