Skip to content

Commit

Permalink
remove useless changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattisonchao committed Oct 16, 2024
1 parent f559194 commit 1d47a97
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
8 changes: 2 additions & 6 deletions server/follower_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func NewFollowerControllerWithContext(config Config, namespace string, shardId i
"oxia": "follower-apply-committed-entries",
"shard": fmt.Sprintf("%d", fc.shardId),
},
fc.ApplyAllCommittedEntries,
fc.applyAllCommittedEntries,
)

fc.log.Info(
Expand Down Expand Up @@ -492,7 +492,7 @@ func (fc *followerController) handleReplicateSync(stream proto.OxiaLogReplicatio
}
}

func (fc *followerController) ApplyAllCommittedEntries() {
func (fc *followerController) applyAllCommittedEntries() {
for {
fc.Lock()
if err := fc.applyEntriesCond.Wait(fc.ctx); err != nil {
Expand Down Expand Up @@ -788,7 +788,3 @@ func (fc *followerController) DeleteShard(request *proto.DeleteShardRequest) (*p

return &proto.DeleteShardResponse{}, nil
}

func (fc *followerController) GetDB() kv.DB {
return fc.db
}
4 changes: 0 additions & 4 deletions server/kv/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -803,10 +803,6 @@ func (d *db) ReadNextNotifications(ctx context.Context, startOffset int64) ([]*p
return d.notificationsTracker.ReadNextNotifications(ctx, startOffset)
}

func (d *db) GetKv() KV {
return d.kv
}

type noopCallback struct{}

func (*noopCallback) OnPut(_ WriteBatch, _ *proto.PutRequest, _ *proto.StorageEntry) (proto.Status, error) {
Expand Down
5 changes: 0 additions & 5 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,3 @@ func (s *Server) Close() error {

return err
}

// GetShardDirector is using for testing
func (s *Server) GetShardDirector() ShardsDirector {
return s.shardsDirector
}

0 comments on commit 1d47a97

Please sign in to comment.