Repository navigation
fix(options): Read the silo-dependent model once in OptionsStore - #131740
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
OptionsStore.model follows the current silo mode. get_store and get_last_update_channel read it for the query and again for the except clause, so a silo mode switch on another thread in between let Option.DoesNotExist escape as an error. Relay integration tests hit this as intermittent 500s on /api/0/relays/projectconfigs/ when a live server request ran while the test switched silo mode. Refs DI-2898 Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
joshuarli
approved these changes
Nov 19, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs DI-2898
OptionsStore.modelreturnsOptionorControlOptiondepending on the current silo mode.get_storeandget_last_update_channelread it twice: once for the query and again in theexceptclause. If another thread switches silo mode in between, the query raisesOption.DoesNotExist, but theexceptis looking forControlOption.DoesNotExist. The missing option then escapes as an error instead of being treated as a miss.This showed up in Relay integration tests as intermittent 500s on
/api/0/relays/projectconfigs/. The live server thread served Relay's global config fetch while the test's main thread was insideassume_test_silo_mode.Both methods now read the model once and use it for both the query and the
except.set_storeanddelete_storealready read it once.via @joshuarli.
--
View Session [Sentry]