Skip to content

Commit

Permalink
This is an automated cherry-pick of #8383
Browse files Browse the repository at this point in the history
close #8384

Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
rleungx authored and ti-chi-bot committed Jul 12, 2024
1 parent 05207d6 commit 19f6af8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,21 @@ func (s *Server) startServer(ctx context.Context) error {
Label: idAllocLabel,
Member: s.member.MemberValue(),
})
<<<<<<< HEAD
regionStorage, err := storage.NewStorageWithLevelDBBackend(ctx, filepath.Join(s.cfg.DataDir, "region-meta"), s.encryptionKeyManager)
=======
s.encryptionKeyManager, err = encryption.NewManager(s.client, &s.cfg.Security.Encryption)
if err != nil {
return err
}
// Initialize an etcd storage as the default storage.
defaultStorage := storage.NewStorageWithEtcdBackend(s.client, s.rootPath)
// Initialize a specialized LevelDB storage to store the region-related meta info independently.
regionStorage, err := storage.NewRegionStorageWithLevelDBBackend(
ctx,
filepath.Join(s.cfg.DataDir, "region-meta"),
s.encryptionKeyManager)
>>>>>>> c50993b2f (*: fix the initialization of encryption key manager (#8383))
if err != nil {
return err
}
Expand All @@ -449,12 +463,16 @@ func (s *Server) startServer(ctx context.Context) error {
}
}

<<<<<<< HEAD
s.encryptionKeyManager, err = encryption.NewManager(s.client, &s.cfg.Security.Encryption)
if err != nil {
return err
}

s.gcSafePointManager = gc.NewSafePointManager(s.storage)
=======
s.gcSafePointManager = gc.NewSafePointManager(s.storage, s.cfg.PDServerCfg)
>>>>>>> c50993b2f (*: fix the initialization of encryption key manager (#8383))
s.basicCluster = core.NewBasicCluster()
s.cluster = cluster.NewRaftCluster(ctx, s.clusterID, syncer.NewRegionSyncer(s), s.client, s.httpClient)
keyspaceIDAllocator := id.NewAllocator(&id.AllocatorParams{
Expand Down

0 comments on commit 19f6af8

Please sign in to comment.