Skip to content

Commit

Permalink
Merge branch 'master' into set-u
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Dec 31, 2021
2 parents f2c509d + 4608f6a commit 143d5a9
Show file tree
Hide file tree
Showing 7 changed files with 487 additions and 170 deletions.
5 changes: 4 additions & 1 deletion cdc/processor/pipeline/sorter.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ func (n *sorterNode) StartActorNode(ctx pipeline.NodeContext, isTableActorMode b
startTs := ctx.ChangefeedVars().Info.StartTs
actorID := ctx.GlobalVars().SorterSystem.ActorID(uint64(n.tableID))
router := ctx.GlobalVars().SorterSystem.Router()
levelSorter := leveldb.NewSorter(ctx, n.tableID, startTs, router, actorID)
compactScheduler := ctx.GlobalVars().SorterSystem.CompactScheduler()
levelSorter := leveldb.NewSorter(
ctx, n.tableID, startTs, router, actorID, compactScheduler,
config.GetGlobalServerConfig().Debug.DB)
n.cleanID = actorID
n.cleanTask = levelSorter.CleanupTask()
n.cleanRouter = ctx.GlobalVars().SorterSystem.CleanerRouter()
Expand Down
7 changes: 6 additions & 1 deletion cdc/sorter/leveldb/system/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ func (s *System) CleanerRouter() *actor.Router {
return s.cleanRouter
}

// CompactScheduler returns compaction scheduler.
func (s *System) CompactScheduler() *lsorter.CompactScheduler {
return s.compactSched
}

// broadcase messages to actors in the router.
// Caveats it may lose messages quietly.
func (s *System) broadcast(ctx context.Context, router *actor.Router, msg message.Message) {
Expand Down Expand Up @@ -139,7 +144,7 @@ func (s *System) Start(ctx context.Context) error {
dbCount := s.cfg.Count
for id := 0; id < dbCount; id++ {
// Open db.
db, err := db.OpenLevelDB(ctx, id, s.dir, s.cfg)
db, err := db.OpenPebble(ctx, id, s.dir, s.cfg)
if err != nil {
return errors.Trace(err)
}
Expand Down
Loading

0 comments on commit 143d5a9

Please sign in to comment.