From f5552eeb010b4c7f562bea07635d74628200f423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Senart?= Date: Sat, 17 Jul 2021 14:13:17 +0200 Subject: [PATCH 1/2] 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. --- cmd/repo-updater/shared/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/repo-updater/shared/main.go b/cmd/repo-updater/shared/main.go index 86968b8cf3cfb..eb8fd6cb48897 100644 --- a/cmd/repo-updater/shared/main.go +++ b/cmd/repo-updater/shared/main.go @@ -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 From 177be02af598657e0e756b5f1eb93e326a33e926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Senart?= Date: Sat, 17 Jul 2021 14:23:24 +0200 Subject: [PATCH 2/2] fixup! Update CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17bbe528eca27..511624a3276ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)