Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

kvproto_hash=465fa4c7b42e644d5aacaf79d06c75733dc12eb3
kvproto_hash=d62ddcee4ccd95f19f3ffa89c2832f2fb81030ca
raft_rs_hash=b9891b673573fad77ebcf9bbe0969cf945841926
tipb_hash=c4d518eb1d60c21f05b028b36729e64610346dac

Expand Down
10 changes: 6 additions & 4 deletions src/main/java/org/tikv/br/BackupDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ public BackupDecoder(Brpb.BackupMeta backupMeta, boolean ttlEnabled) throws SSTD
}

private KVDecoder initKVDecoder() throws SSTDecodeException {
// Currently only v1 is supported.
// V2 will be added after https://github.com/tikv/tikv/issues/10938.
if (backupMeta.getIsRawKv()) {
// TODO: ttl_enable should be witten to BackupMeta
return new RawKVDecoderV1(ttlEnabled);
if ("V1".equals(backupMeta.getApiVersion().name())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the api version in the backup meta is V1ttl?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for V1 mode, the parameter ttl is designed to be passed by parameter.
not stored in the backup meta.
Cause it will be replaced by API V2 soon, so we simply do not store ttl in backup meta.

return new RawKVDecoderV1(ttlEnabled);
} else {
throw new SSTDecodeException(
"does not support decode APIVersion " + backupMeta.getApiVersion().name());
}
} else {
throw new SSTDecodeException("TxnKV is not supported yet!");
}
Expand Down