Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Take out a lock before modifying _CACHES #7663

Merged
merged 2 commits into from
Jun 10, 2020
Merged

Take out a lock before modifying _CACHES #7663

merged 2 commits into from
Jun 10, 2020

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Jun 9, 2020

This should fix #7610.

One thing that struck me while I was looking at this: are we sure the rest of the cache code is thread-safe? Or have we got other timebombs here?

@richvdh richvdh requested a review from a team June 9, 2020 17:37
Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is probably correct, though I do wonder if we should be calling resize_all_caches every time we add a cache, since the assumption that we only create new ones at start up is wrong?

@richvdh
Copy link
Member Author

richvdh commented Jun 10, 2020

yeah I didn't quite follow why we were resizing all caches when only one had been added.

@richvdh richvdh merged commit 0df618f into develop Jun 10, 2020
@richvdh richvdh deleted the rav/lock_caches branch June 10, 2020 17:27
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit '03619324f':
  Create a ListenerConfig object (#7681)
  Fix changelog wording
  1.15.1
  Wrap register_device coroutine in an ensureDeferred (#7684)
  Ensure the body is a string before comparing push rules. (#7701)
  Ensure etag is a string for GET room_keys/version response (#7691)
  Update m.id.phone to use 'phone' instead of 'number' (#7687)
  Fix "There was no active span when trying to log." error (#7698)
  Enable 3PID add/bind/unbind endpoints on r0 routes
  Discard RDATA from already seen positions. (#7648)
  Replace iteritems/itervalues/iterkeys with native versions. (#7692)
  Fix warnings about losing log context during UI auth. (#7688)
  Fix a typo when comparing the URI & method during UI Auth. (#7689)
  Remove "user_id" from GET /presence. (#7606)
  Increase the default SAML session expirary time to 15 minutes. (#7664)
  fix typo in sample_config.yaml (#7652)
  Take out a lock before modifying _CACHES (#7663)
  Add option to enable encryption by default for new rooms (#7639)
  Clean-up the fallback login code. (#7657)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on startup (1.14.0)
2 participants