Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Lots of empty region after restore #163

Closed
overvenus opened this issue Feb 20, 2020 · 3 comments · Fixed by tikv/tikv#7241, #233 or tikv/tikv#7415
Closed

Lots of empty region after restore #163

overvenus opened this issue Feb 20, 2020 · 3 comments · Fixed by tikv/tikv#7241, #233 or tikv/tikv#7415
Labels
type/bug Something isn't working

Comments

@overvenus
Copy link
Member

Region size is not updated during BR restore, this is because we forget to set Length of SSTMeta.

br/pkg/restore/util.go

Lines 140 to 149 in 008ec45

return import_sstpb.SSTMeta{
Uuid: id,
CfName: cfName,
Range: &import_sstpb.Range{
Start: rangeStart,
End: rangeEnd,
},
RegionId: region.GetId(),
RegionEpoch: region.GetRegionEpoch(),
}

The Length means the length of the SST file, so TiKV should record it during backup as requested in #95 .

@overvenus overvenus added the type/bug Something isn't working label Feb 20, 2020
@kennytm
Copy link
Collaborator

kennytm commented Feb 20, 2020

This is a bug in BR only right? The Files in the BackupResponse already contained the size.

https://github.com/pingcap/kvproto/blob/dba161a41fd2edfe1349a7c7322276640642633d/proto/backup.proto#L63

@overvenus
Copy link
Member Author

TiKV has not filled it yet, so we need to touch TiKV too.

@kennytm
Copy link
Collaborator

kennytm commented Feb 20, 2020

Ah ok.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/bug Something isn't working
Projects
None yet
3 participants