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

Make lmdbslab optsfile updates only when the yamlload result is safe to use. #2694

Merged
merged 2 commits into from May 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

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