forked from TrueCloudLab/frostfs-node
[#316] ir/locode: Open LOCODE database in read-only mode
Inner ring Server does not modify LOCODE database (Put method), thus it is better to open it in RO mode. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
0d2440649a
commit
46d60f3d52
1 changed files with 3 additions and 1 deletions
|
@ -12,7 +12,9 @@ import (
|
|||
func (s *Server) newLocodeValidator(cfg *viper.Viper) (netmap.NodeValidator, error) {
|
||||
locodeDB := locodebolt.New(locodebolt.Prm{
|
||||
Path: cfg.GetString("locode.db.path"),
|
||||
})
|
||||
},
|
||||
locodebolt.ReadOnly(),
|
||||
)
|
||||
|
||||
s.registerStarter(locodeDB.Open)
|
||||
s.registerIOCloser(locodeDB)
|
||||
|
|
Loading…
Reference in a new issue