Skip to content
Snippets Groups Projects
  1. Dec 18, 2020
    • Erik Johnston's avatar
      Fix mainline ordering in state res v2 (#8971) · 5e7d75da
      Erik Johnston authored
      This had two effects 1) it'd give the wrong answer and b) would iterate
      *all* power levels in the auth chain of each event. The latter of which
      can be *very* expensive for certain types of IRC bridge rooms that have
      large numbers of power level changes.
      5e7d75da
  2. Dec 04, 2020
  3. Dec 02, 2020
    • Erik Johnston's avatar
      Correctly handle unpersisted events when calculating auth chain difference. (#8827) · c5b6abd5
      Erik Johnston authored
      We do state res with unpersisted events when calculating the new current state of the room, so that should be the only thing impacted. I don't think this is tooooo big of a deal as:
      
      1. the next time a state event happens in the room the current state should correct itself;
      2. in the common case all the unpersisted events' auth events will be pulled in by other state, so will still return the correct result (or one which is sufficiently close to not affect the result); and
      3. we mostly use the state at an event to do important operations, which isn't affected by this.
      c5b6abd5
  4. Sep 04, 2020
  5. Jul 24, 2020
  6. Jun 24, 2020
    • Erik Johnston's avatar
      Yield during large v2 state res. (#7735) · 0e0a2817
      Erik Johnston authored
      State res v2 across large data sets can be very CPU intensive, and if
      all the relevant events are in the cache the algorithm will run from
      start to finish within a single reactor tick. This can result in
      blocking the reactor tick for several seconds, which can have major
      repercussions on other requests.
      
      To fix this we simply add the occaisonal `sleep(0)` during iterations to
      yield execution until the next reactor tick. The aim is to only do this
      for large data sets so that we don't impact otherwise quick resolutions.=
      0e0a2817
  7. Jun 16, 2020
  8. Mar 18, 2020
    • Erik Johnston's avatar
      Improve get auth chain difference algorithm. (#7095) · 4a17a647
      Erik Johnston authored
      It was originally implemented by pulling the full auth chain of all
      state sets out of the database and doing set comparison. However, that
      can take a lot work if the state and auth chains are large.
      
      Instead, lets try and fetch the auth chains at the same time and
      calculate the difference on the fly, allowing us to bail early if all
      the auth chains converge. Assuming that the auth chains do converge more
      often than not, this should improve performance. Hopefully.
      4a17a647
  9. Feb 19, 2020
  10. Feb 07, 2020
  11. Dec 16, 2019
  12. Dec 13, 2019
  13. Jun 20, 2019
  14. May 10, 2019
  15. Apr 01, 2019
  16. Jan 25, 2019
  17. Nov 05, 2018
  18. Nov 02, 2018
  19. Oct 24, 2018
  20. Oct 16, 2018
Loading