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

Disable frozen dicts by default #3987

Merged
merged 9 commits into from Oct 2, 2018

Conversation

Projects
None yet
2 participants
@hawkowl
Contributor

hawkowl commented Oct 1, 2018

No description provided.

@richvdh

can we make synapse.events.USE_FROZEN_DICTS default to False, except where it is overridden by the config?

hawkowl added some commits Oct 1, 2018

fix

fixed

@hawkowl hawkowl requested a review from matrix-org/synapse-core Oct 2, 2018

Show resolved Hide resolved synapse/events/__init__.py Outdated
Show resolved Hide resolved synapse/events/__init__.py Outdated
Show resolved Hide resolved tests/replication/slave/storage/test_events.py
fix

@hawkowl hawkowl requested a review from matrix-org/synapse-core Oct 2, 2018

# NOTE: This is overridden by the configuration by the Synapse worker apps, but
# for the sake of tests, it is set here while it cannot be configured on the
# homeserver object itself.
USE_FROZEN_DICTS = strtobool(os.environ.get("SYNAPSE_USE_FROZEN_DICTS", "0"))

This comment has been minimized.

@richvdh

richvdh Oct 2, 2018

Member

is there an intention to set this for the tests somewhere?

@@ -136,6 +136,8 @@ def default_config(name):
config.rc_messages_per_second = 10000
config.rc_message_burst_count = 10000
config.use_frozen_dicts = False

This comment has been minimized.

@richvdh

richvdh Oct 2, 2018

Member

I'm wondering if this is actually used (since afaict use_frozen_dicts is only read by code which is never run under the UTs), and if not I would probably choose to omit this. But I'm not that bothered and this needs merging.

@richvdh

richvdh approved these changes Oct 2, 2018

@hawkowl hawkowl merged commit 7232917 into develop Oct 2, 2018

6 checks passed

ci/circleci: sytestpy2merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy2postgresmerged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3postgresmerged Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@hawkowl hawkowl deleted the hawkowl/frozendicts branch Oct 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment