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

A few fixes to logcontext things#2027

Merged
richvdh merged 3 commits intodevelopfrom
rav/logcontext_leaks
Mar 20, 2017
Merged

A few fixes to logcontext things#2027
richvdh merged 3 commits intodevelopfrom
rav/logcontext_leaks

Conversation

@richvdh
Copy link
Copy Markdown
Member

@richvdh richvdh commented Mar 18, 2017

These should stop some leaks of logcontexts into the reactor, and shut up some of the 'Unexpected logcontext' messages.

The commits should make sense in their own rights.

richvdh added 3 commits March 18, 2017 00:01
background_updates was using `call_later` in a way that leaked the logcontext
into the reactor.

We could have rewritten it to do it properly, but given that we weren't using
the fancier facilities provided by `call_later`, we might as well just use
`async.sleep`, which does the logcontext stuff properly.
This fixes a class of 'Unexpected logcontext' messages, which were happening
because the logcontext was somewhat arbitrarily swapping between the sentinel
and the `run` logcontext.
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.
@erikjohnston
Copy link
Copy Markdown
Member

lgtm

@richvdh richvdh merged commit eddce9d into develop Mar 20, 2017
@richvdh richvdh deleted the rav/logcontext_leaks branch March 20, 2017 11:53
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.

2 participants