Skip to content

Commit

Permalink
make excludeReconstructedIndices optional
Browse files Browse the repository at this point in the history
  • Loading branch information
RuinanGu committed Jun 20, 2022
1 parent 686b7a5 commit c30f008
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ message BlockECReconstructionInfoProto {
required StorageTypesProto targetStorageTypes = 5;
required bytes liveBlockIndices = 6;
required ErasureCodingPolicyProto ecPolicy = 7;
required bytes excludeReconstructedIndices = 8;
optional bytes excludeReconstructedIndices = 8;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,9 @@ public static BlockECReconstructionInfo convertBlockECReconstructionInfo(
byte[] liveBlkIndices = blockEcReconstructionInfoProto.getLiveBlockIndices()
.toByteArray();
byte[] excludeReconstructedIndices =
blockEcReconstructionInfoProto.hasExcludeReconstructedIndices() ?
blockEcReconstructionInfoProto.getExcludeReconstructedIndices()
.toByteArray();
.toByteArray() : new byte[0];
ErasureCodingPolicy ecPolicy =
PBHelperClient.convertErasureCodingPolicy(
blockEcReconstructionInfoProto.getEcPolicy());
Expand Down

0 comments on commit c30f008

Please sign in to comment.