Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
repos: Make streaming syncer the default (#22948)
Browse files Browse the repository at this point in the history
* repos: Make streaming syncer the default

This commit makes the streaming syncer the default mode, while giving
admins the option to disable it by setting the env var to false.

We've been running this in production for about a week without any
major problems apart from a small bug that only affected sourcegraph.com
in practice (that was fixed in #22947).

Making it the default will benefit large customers already and allow us
to start deleting old code paths.

* fixup! Update CHANGELOG
  • Loading branch information
Tomás Senart authored Jul 19, 2021
1 parent 69cced7 commit 6ee0a57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ All notable changes to Sourcegraph are documented in this file.
- Backend Code Insights will aggregate viewable repositories based on the authenticated user. [#22471](https://github.com/sourcegraph/sourcegraph/pull/22471)
- Added support for highlighting .frugal files as Thrift syntax.
- Added `file:contains.content(regexp)` predicate, which filters only to files that contain matches of the given pattern. [#22666](https://github.com/sourcegraph/sourcegraph/pull/22666)
- Repository syncing can now be done in a streaming mode via the `ENABLE_STREAMING_REPOS_SYNCER` environment variable in `repo-updater`. Customers with many repositories should notice code host updates much faster when this is enabled. It will become default in the next release. [#22756](https://github.com/sourcegraph/sourcegraph/pull/22756)
- Repository syncing is now done in streaming mode by default. Customers with many repositories should notice code host updates much faster, with repo-updater consuming less memory. Using the previous batch mode can be done by setting the `ENABLE_STREAMING_REPOS_SYNCER` environment variable to `false` in `repo-updater`. That environment variable will be deleted in the next release. [#22756](https://github.com/sourcegraph/sourcegraph/pull/22756)
- Enabled the ability to query Batch Changes changesets, changesets stats, and file diff stats for an individual repository via the Sourcegraph GraphQL API. [#22744](https://github.com/sourcegraph/sourcegraph/pull/22744/)
- Added "Groovy" to the initial `lang:` filter suggestions in the search bar. [#22755](https://github.com/sourcegraph/sourcegraph/pull/22755)
- The `lang:` filter suggestions now show all supported, matching languages as the user types a language name. [#22765](https://github.com/sourcegraph/sourcegraph/pull/22765)
Expand Down
4 changes: 2 additions & 2 deletions cmd/repo-updater/shared/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ func Main(enterpriseInit EnterpriseInit) {
Logger: log15.Root(),
Now: clock,
Registerer: prometheus.DefaultRegisterer,
Streaming: os.Getenv("ENABLE_STREAMING_REPOS_SYNCER") == "true",
Streaming: os.Getenv("ENABLE_STREAMING_REPOS_SYNCER") != "false",
}

if syncer.Streaming {
log15.Info("Running syncer in streaming mode because ENABLE_STREAMING_REPOS_SYNCER is set to true ")
log15.Info("Running syncer in streaming mode because ENABLE_STREAMING_REPOS_SYNCER != false")
}

var gps *repos.GitolitePhabricatorMetadataSyncer
Expand Down

0 comments on commit 6ee0a57

Please sign in to comment.