Skip to content

Conversation

@samarabbas
Copy link
Contributor

What changed?
This change forces ShardID to start with 1 instead of 0 for
implementation to validate if ShardID is not passed in where
it is a required field.

Why?
ShardID is passed in as a field for multiple protobuf messages. We
have created a guideline to not use 0 as a valid value for protobuf
field in a message.
Previously we used 0 as a valid ShardID which makes it impossible to
differentiate between ShardID field as not set versus caller
specifically passing in 0.

How did you test it?
Unit and Integration tests

Potential risks
This could potential cause issues with shard unavailability

ShardID is passed in as a field for multiple protobuf messages.  We
have created a guideline to not use 0 as a valid value for protobuf
field in a message.
Previously we used 0 as a valid ShardID which makes it impossible to
differentiate between ShardID field as not set versus caller
specifically passing in 0.
This change forces ShardID to start with 1 instead of 0 for
implementation to validate if ShardID is not passed in where
it is a required field.
@samarabbas samarabbas merged commit ced7304 into temporalio:master Jul 31, 2020
@samarabbas samarabbas deleted the shard-id-to-start-from-1 branch July 31, 2020 01:22
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

Successfully merging this pull request may close these issues.

2 participants