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

table update hit 'OTSParameterInvalid TimeToLive cannot be 0 or less than -1.' issue #18

Open
zzxwill opened this issue Apr 10, 2018 · 4 comments

Comments

@zzxwill
Copy link
Member

zzxwill commented Apr 10, 2018

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)
@red-chen
Copy link
Contributor

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的时候做一下判断,当值‘’合法‘’时才序列化

@zzxwill
Copy link
Member Author

zzxwill commented Apr 11, 2018

是指sdk需要优化吗?

@red-chen
Copy link
Contributor

是的,需要SDK优化一下

@zzxwill
Copy link
Member Author

zzxwill commented Apr 18, 2018

Thanks.

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

2 participants