Initialize ShardInfo::shardId, ShardInfo::desiredShardId. (#8750)

* Initialize ShardInfo::shardId, ShardInfo::desiredShardId.

* corrected type.

* Corrected type.
This commit is contained in:
He Liu 2022-11-09 12:50:30 -08:00 committed by GitHub
parent 34da5e25a2
commit 58ebe486f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -250,7 +250,7 @@ struct AddingShard : NonCopyable {
class ShardInfo : public ReferenceCounted<ShardInfo>, NonCopyable {
ShardInfo(KeyRange keys, std::unique_ptr<AddingShard>&& adding, StorageServer* readWrite)
: adding(std::move(adding)), readWrite(readWrite), keys(keys), version(0) {}
: adding(std::move(adding)), readWrite(readWrite), keys(keys), shardId(0LL), desiredShardId(0LL), version(0) {}
public:
// A shard has 3 mutual exclusive states: adding, readWrite and notAssigned.