forked from TrueCloudLab/frostfs-node
[#958] cli/locode: Open RO database in info
command
CLI `util locode info` command does not write operations. Opening a `locodebolt.DB` instance in RW mode is redundant. Provide `locodebolt.ReadOnly()` option to `locodebolt.DB` constructor in order to create READ flock over BoltDB file. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
cee4f3142f
commit
a3414b36dd
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ var (
|
|||
Run: func(cmd *cobra.Command, _ []string) {
|
||||
targetDB := locodebolt.New(locodebolt.Prm{
|
||||
Path: locodeInfoDBPath,
|
||||
})
|
||||
}, locodebolt.ReadOnly())
|
||||
|
||||
err := targetDB.Open()
|
||||
exitOnErr(cmd, err)
|
||||
|
|
Loading…
Reference in a new issue