Skip to content

Commit

Permalink
Make lmdbslab optsfile updates only when the yamlload result is safe …
Browse files Browse the repository at this point in the history
…to use. (#2694)
  • Loading branch information
vEpiphyte committed May 25, 2022
1 parent 30ff9c5 commit 940097e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion synapse/lib/lmdbslab.py
Expand Up @@ -675,7 +675,9 @@ async def __anit__(self, path, **kwargs):
raise s_exc.SlabAlreadyOpen(mesg=path)

if os.path.isfile(self.optspath):
opts.update(s_common.yamlload(self.optspath))
_opts = s_common.yamlload(self.optspath)
if isinstance(_opts, dict):
opts.update(_opts)

initial_mapsize = opts.get('map_size')
if initial_mapsize is None:
Expand Down

0 comments on commit 940097e

Please sign in to comment.