Skip to content
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

PythonSession should always set recording-id when acquiring global session #1792

Open
jleibs opened this issue Apr 6, 2023 · 0 comments
Open
Labels
enhancement New feature or request 🐍 Python API Python logging API

Comments

@jleibs
Copy link
Member

jleibs commented Apr 6, 2023

Full discussion here:
#1778 (comment)

TLDR:

  • We currently initialize the RecordingId during python init.
  • Until python init has been run, the RecordingId is left with a value of ZERO
  • It is conceivable (though practically difficult) to end up in a situation where some message is send using this RecordingId
    • Note: I don't believe this is actually possible in pure python code, but could show up in an edge case of another rust-based python extension logging something during init.

I think the right solution is to change python_session() to take the Python<_> object as an argument, which would then allow us to always initialize the session correctly. However, this requires some case since it introduces new potential for deadlocks, in particular the kinds of problems resolved in: #843

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🐍 Python API Python logging API
Projects
None yet
Development

No branches or pull requests

1 participant