Skip to content

Commit

Permalink
fix(restore): Set kv version to restoreTs for all keys (#7930)
Browse files Browse the repository at this point in the history
The kv version should be set to restore timestamp for rolled-up keys
and schema keys as well.
  • Loading branch information
mangalaman93 committed Feb 1, 2023
1 parent c175edc commit cbe1a11
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions worker/restore_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,9 @@ func (m *mapper) processReqCh(ctx context.Context) error {
return err
}
for _, kv := range kvs {
if err := toBuffer(kv, kv.Version); err != nil {
version := kv.Version
kv.Version = m.restoreTs
if err := toBuffer(kv, version); err != nil {
return err
}
}
Expand Down Expand Up @@ -398,8 +400,10 @@ func (m *mapper) processReqCh(ctx context.Context) error {
kv.StreamId = 0
// Schema and type keys are not stored in an intermediate format so their
// value can be written as is.
version := kv.Version
kv.Version = m.restoreTs
kv.Key = restoreKey
if err := toBuffer(kv, kv.Version); err != nil {
if err := toBuffer(kv, version); err != nil {
return err
}

Expand Down

0 comments on commit cbe1a11

Please sign in to comment.