-
Notifications
You must be signed in to change notification settings - Fork 457
fix(rc): switch from type to typecode for mp reliability #14531
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
Conversation
|
f3a6d97
to
36d9ed9
Compare
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 267 ± 2 ms. The average import time from base is: 274 ± 5 ms. The import time difference between this PR and base is: -7.5 ± 0.2 ms. Import time breakdownThe following import paths have appeared:
|
5de0b1d
to
ac460bb
Compare
Performance SLOsCandidate: tyler.finethy/DEBUG-4453 (a337a68) 🔵 No Baseline Data (24 suites)🔵 coreapiscenario - 12/12 (2 unstable)🔵 No baseline data available for this suite
|
fff08a6
to
2c7a294
Compare
This switches the shared data for the remote configuration PublisherSubscriberConnector to use a typecode instead of a type that relies on sizeof. This should be more reliable across Python versions and fix an issue with Python3.13: ``` get_mp_context().Array(c_char, SHARED_MEMORY_SIZE, lock=False): TypeError: this type has no size ``` This change should be identical, and for more information, see the docs here: - https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Array - https://docs.python.org/3/library/array.html#module-array - https://docs.python.org/3/library/ctypes.html Refs: DEBUG-4453
2c7a294
to
a337a68
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would love to see a regression test if possible, but it was showing up in the django weblog
no clue why this is happening or what changed in Python 3.13
Manually confirmed that this does fix the issue via system-tests |
IIRC a similar issue in the past was due to module cloning for |
This switches the shared data for the remote configuration PublisherSubscriberConnector to use a typecode instead of an explicit type to take advantage of an internal mapping. This should be more reliable across Python versions and fix an issue with Python3.13:
This change should be identical, and for more information, see the docs here:
Refs: DEBUG-4453
Relevant stacktrace:
Checklist
Reviewer Checklist