Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: hillium <[email protected]>
  • Loading branch information
YuJuncen committed Jan 17, 2025
1 parent b5ee1c5 commit 8934c8f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion br/pkg/stream/stream_metas.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,11 @@ func (m MigrationExt) Load(ctx context.Context, opts ...LoadOptions) (Migrations
if err != nil {
return errors.Trace(err)
}
err = t.unmarshalContent(b)
if err != nil {
return err
}

if t.SeqNum == baseMigrationSN {
// NOTE: the legacy truncating isn't implemented by appending a migration.
// We load their checkpoint here to be compatible with them.
Expand All @@ -715,7 +720,7 @@ func (m MigrationExt) Load(ctx context.Context, opts ...LoadOptions) (Migrations
}
t.Content.TruncatedTo = max(truncatedTs, t.Content.TruncatedTo)
}
return t.Content.Unmarshal(b)
return nil
})
collected := iter.CollectAll(ctx, items)
if collected.Err != nil {
Expand Down

0 comments on commit 8934c8f

Please sign in to comment.