Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raft: Remove driver #6518

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading