Skip to content

Commit

Permalink
Raft: Remove driver (#6518)
Browse files Browse the repository at this point in the history
  • Loading branch information
luluz66 committed May 7, 2024
1 parent e846d6c commit 467607c
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 583 deletions.
1 change: 0 additions & 1 deletion enterprise/server/raft/cache/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ go_library(
importpath = "github.com/buildbuddy-io/buildbuddy/enterprise/server/raft/cache",
deps = [
"//enterprise/server/raft/bringup",
"//enterprise/server/raft/driver",
"//enterprise/server/raft/filestore",
"//enterprise/server/raft/logger",
"//enterprise/server/raft/rbuilder",
Expand Down
10 changes: 0 additions & 10 deletions enterprise/server/raft/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"time"

"github.com/buildbuddy-io/buildbuddy/enterprise/server/raft/bringup"
"github.com/buildbuddy-io/buildbuddy/enterprise/server/raft/driver"
"github.com/buildbuddy-io/buildbuddy/enterprise/server/raft/filestore"
"github.com/buildbuddy-io/buildbuddy/enterprise/server/raft/rbuilder"
"github.com/buildbuddy-io/buildbuddy/enterprise/server/raft/registry"
Expand Down Expand Up @@ -85,7 +84,6 @@ type RaftCache struct {

store *store.Store
clusterStarter *bringup.ClusterStarter
driver *driver.Driver

shutdown chan struct{}
shutdownOnce *sync.Once
Expand Down Expand Up @@ -180,17 +178,10 @@ func NewRaftCache(env environment.Env, conf *Config) (*RaftCache, error) {
return nil, err
}

eventsCh := rc.store.AddEventListener()

// start the driver once bringup is complete.
rc.driver = driver.New(rc.store, rc.gossipManager, eventsCh)
go func() {
for !rc.clusterStarter.Done() {
time.Sleep(100 * time.Millisecond)
}
if err := rc.driver.Start(); err != nil {
log.Errorf("Error starting driver: %s", err)
}
}()

env.GetHealthChecker().RegisterShutdownFunction(func(ctx context.Context) error {
Expand Down Expand Up @@ -367,7 +358,6 @@ func (rc *RaftCache) Writer(ctx context.Context, r *rspb.ResourceName) (interfac
func (rc *RaftCache) Stop() error {
rc.shutdownOnce.Do(func() {
close(rc.shutdown)
rc.driver.Stop()
rc.store.Stop(context.Background())
rc.gossipManager.Leave()
rc.gossipManager.Shutdown()
Expand Down
34 changes: 0 additions & 34 deletions enterprise/server/raft/driver/BUILD

This file was deleted.

Loading

0 comments on commit 467607c

Please sign in to comment.