Skip to content

Fix no-shards-loaded being reported as crashes#512

Merged
mrnugget merged 1 commit into
mainfrom
mrn/mark-empty-ready
Jan 4, 2023
Merged

Fix no-shards-loaded being reported as crashes#512
mrnugget merged 1 commit into
mainfrom
mrn/mark-empty-ready

Conversation

@mrnugget

@mrnugget mrnugget commented Jan 4, 2023

Copy link
Copy Markdown
Contributor

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

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`
@mrnugget mrnugget merged commit 54c8cf0 into main Jan 4, 2023
@mrnugget mrnugget deleted the mrn/mark-empty-ready branch January 4, 2023 18:02
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 keegancsmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants