Skip to content

Commit

Permalink
added more hints for generating rewrite rule
Browse files Browse the repository at this point in the history
Signed-off-by: hillium <[email protected]>
  • Loading branch information
YuJuncen committed Jan 9, 2025
1 parent 9a72ddc commit 2e2dd07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions br/pkg/restore/log_client/compacted_file_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ func (cs *CompactedFileSplitStrategy) Accumulate(ssts SSTs) {
splitHelper, exist := cs.TableSplitter[identity.EffectiveID]
if !exist {
splitHelper = split.NewSplitHelper()
log.Info("Initialized splitter for table.",
zap.Int64("table-id", ssts.TableID()), zap.Int64("effective-id", identity.EffectiveID), zap.Stringer("rewrite-boundary", identity.RewriteBoundary))
cs.TableSplitter[identity.EffectiveID] = splitHelper
}

Expand Down
4 changes: 4 additions & 0 deletions br/pkg/restore/utils/rewrite_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ func FindMatchedRewriteRule(file AppliedFile, rules *RewriteRules) *import_sstpb
}

func (r *RewriteRules) String() string {
if r == nil {
return "[]"
}

var out strings.Builder
out.WriteRune('[')
if len(r.OldKeyspace) != 0 {
Expand Down

0 comments on commit 2e2dd07

Please sign in to comment.