Skip to content
Snippets Groups Projects
  1. Aug 10, 2018
  2. Jul 27, 2018
  3. Jul 20, 2018
  4. Jul 17, 2018
  5. Jul 13, 2018
  6. Jul 09, 2018
  7. Jul 04, 2018
  8. Jun 22, 2018
  9. Jun 14, 2018
  10. Jun 05, 2018
  11. May 29, 2018
  12. May 02, 2018
    • Richard van der Hoff's avatar
      Remove spurious unittest.DEBUG · 11607006
      Richard van der Hoff authored
      11607006
    • Richard van der Hoff's avatar
      Fix a class of logcontext leaks · f22e7cda
      Richard van der Hoff authored
      So, it turns out that if you have a first `Deferred` `D1`, you can add a
      callback which returns another `Deferred` `D2`, and `D2` must then complete
      before any further callbacks on `D1` will execute (and later callbacks on `D1`
      get the *result* of `D2` rather than `D2` itself).
      
      So, `D1` might have `called=True` (as in, it has started running its
      callbacks), but any new callbacks added to `D1` won't get run until `D2`
      completes - so if you `yield D1` in an `inlineCallbacks` function, your `yield`
      will 'block'.
      
      In conclusion: some of our assumptions in `logcontext` were invalid. We need to
      make sure that we don't optimise out the logcontext juggling when this
      situation happens. Fortunately, it is easy to detect by checking `D1.paused`.
      f22e7cda
    • Richard van der Hoff's avatar
      Fix incorrect reference to StringIO · e482f8cd
      Richard van der Hoff authored
      This was introduced in 4f2f5171
      e482f8cd
  13. Apr 22, 2018
  14. Apr 15, 2018
  15. Apr 05, 2018
  16. Jan 18, 2018
  17. Jan 17, 2018
    • Erik Johnston's avatar
      Add decent impl of a FileConsumer · bc67e7d2
      Erik Johnston authored
      Twisted core doesn't have a general purpose one, so we need to write one
      ourselves.
      
      Features:
      - All writing happens in background thread
      - Supports both push and pull producers
      - Push producers get paused if the consumer falls behind
      bc67e7d2
  18. Jan 16, 2018
    • Richard van der Hoff's avatar
      Optimise LoggingContext creation and copying · 44a49841
      Richard van der Hoff authored
      It turns out that the only thing we use the __dict__ of LoggingContext for is
      `request`, and given we create lots of LoggingContexts and then copy them every
      time we do a db transaction or log line, using the __dict__ seems a bit
      redundant. Let's try to optimise things by making the request attribute
      explicit.
      44a49841
  19. Oct 17, 2017
  20. Oct 11, 2017
  21. May 17, 2017
    • Erik Johnston's avatar
      Make get_state_groups_from_groups faster. · bbfe4e99
      Erik Johnston authored
      Most of the time was spent copying a dict to filter out sentinel values
      that indicated that keys did not exist in the dict. The sentinel values
      were added to ensure that we cached the non-existence of keys.
      
      By updating DictionaryCache to keep track of which keys were known to
      not exist itself we can remove a dictionary copy.
      bbfe4e99
  22. Mar 30, 2017
  23. Mar 23, 2017
  24. Mar 22, 2017
    • Richard van der Hoff's avatar
      Fix caching of remote servers' signature keys · 95f21c7a
      Richard van der Hoff authored
      The `@cached` decorator on `KeyStore._get_server_verify_key` was missing
      its `num_args` parameter, which meant that it was returning the wrong key for
      any server which had more than one recorded key.
      
      By way of a fix, change the default for `num_args` to be *all* arguments. To
      implement that, factor out a common base class for `CacheDescriptor` and `CacheListDescriptor`.
      95f21c7a
  25. Mar 18, 2017
    • Richard van der Hoff's avatar
      Stop preserve_fn leaking context into the reactor · f40c2db0
      Richard van der Hoff authored
      Fix a bug in ``logcontext.preserve_fn`` which made it leak context into the
      reactor, and add a test for it.
      
      Also, get rid of ``logcontext.reset_context_after_deferred``, which tried to do
      the same thing but had its own, different, set of bugs.
      f40c2db0
  26. Jan 17, 2017
    • Erik Johnston's avatar
      Tidy up test · 9e8e236d
      Erik Johnston authored
      9e8e236d
    • Erik Johnston's avatar
      Speed up cache size calculation · f85b6ca4
      Erik Johnston authored
      Instead of calculating the size of the cache repeatedly, which can take
      a long time now that it can use a callback, instead cache the size and
      update that on insertion and deletion.
      
      This requires changing the cache descriptors to have two caches, one for
      pending deferreds and the other for the actual values. There's no reason
      to evict from the pending deferreds as they won't take up any more
      memory.
      f85b6ca4
  27. Jan 16, 2017
  28. Jan 13, 2017
  29. Nov 10, 2016
  30. Aug 19, 2016
Loading