Fix no-shards-loaded being reported as crashes#512
Merged
Conversation
Full debug context here: https://sourcegraph.slack.com/archives/C023ELQLV7F/p1672835804462349 Commit 9899a9b changed what the response looks like when Zoekt has never loaded a shard: it now reports a `Crashes = 1`, even if everything's fine. That leads to upstream errors where we show an error message in the Sourcegraph admin UI because the customer hasn't added any repositories to their instance yet. The fix here changes the `loader` to also mark the `shardedSearcher` as ready if there was nothing to load. Previously the `markReady` was skipped, the searcher wasn't marked as "ready" and every search query was replied to with a `Crashes = 1`
ggilmore
approved these changes
Jan 4, 2023
jhchabran
approved these changes
Jan 4, 2023
peterguy
pushed a commit
that referenced
this pull request
Jan 4, 2023
Full debug context here: https://sourcegraph.slack.com/archives/C023ELQLV7F/p1672835804462349 Commit 9899a9b changed what the response looks like when Zoekt has never loaded a shard: it now reports a `Crashes = 1`, even if everything's fine. That leads to upstream errors where we show an error message in the Sourcegraph admin UI because the customer hasn't added any repositories to their instance yet. The fix here changes the `loader` to also mark the `shardedSearcher` as ready if there was nothing to load. Previously the `markReady` was skipped, the searcher wasn't marked as "ready" and every search query was replied to with a `Crashes = 1`
keegancsmith
reviewed
Jan 9, 2023
keegancsmith
left a comment
Member
There was a problem hiding this comment.
LGTM, thank you for the fix!
peterguy
pushed a commit
that referenced
this pull request
Jan 11, 2023
Full debug context here: https://sourcegraph.slack.com/archives/C023ELQLV7F/p1672835804462349 Commit 9899a9b changed what the response looks like when Zoekt has never loaded a shard: it now reports a `Crashes = 1`, even if everything's fine. That leads to upstream errors where we show an error message in the Sourcegraph admin UI because the customer hasn't added any repositories to their instance yet. The fix here changes the `loader` to also mark the `shardedSearcher` as ready if there was nothing to load. Previously the `markReady` was skipped, the searcher wasn't marked as "ready" and every search query was replied to with a `Crashes = 1`
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.
Full debug context here: https://sourcegraph.slack.com/archives/C023ELQLV7F/p1672835804462349
Commit 9899a9b changed what the response looks like when Zoekt has never loaded a shard: it now reports a
Crashes = 1, even if everything's fine.That leads to upstream errors where we show an error message in the Sourcegraph admin UI because the customer hasn't added any repositories to their instance yet.
The fix here changes the
loaderto also mark theshardedSearcheras ready if there was nothing to load. Previously themarkReadywas skipped, the searcher wasn't marked as "ready" and every search query was replied to with aCrashes = 1