aliyun-tablestore-go-sdk
aliyun-tablestore-go-sdk copied to clipboard
table update hit 'OTSParameterInvalid TimeToLive cannot be 0 or less than -1.' issue
I tried to update MaxVersion without changing TimeToLive's value, but it hit 'OTSParameterInvalid TimeToLive cannot be 0 or less than -1.' issue with the code below.
fmt.Println("UpdateTableSample started")
updateTableReq := new(tablestore.UpdateTableRequest)
updateTableReq.TableName = tableName
updateTableReq.TableOption = new(tablestore.TableOption)
updateTableReq.TableOption.MaxVersion = 5
_, err := client.UpdateTable(updateTableReq)
type StreamSpecification struct { EnableStream bool ExpirationTime int32 // must be positive. in hours }
type ReservedThroughput struct { Readcap, Writecap int }
type TableOption struct { TimeToAlive, MaxVersion int }
这三个结构应该在encode的时候做一下判断,当值‘’合法‘’时才序列化
是指sdk需要优化吗?
是的,需要SDK优化一下
Thanks.