use new batch alogorithm by default, fixes #2658

This commit is contained in:
Brad Rydzewski 2019-10-03 14:34:36 -07:00
parent d9945b8bbf
commit fa0ebede19
3 changed files with 7 additions and 4 deletions

View file

@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- option to auto-cancel pending builds when newer build enqueued, by [@bradrydzewski](https://github.com/bradrydzewski). [#1980](https://github.com/drone/drone/issues/1980).
- endpoint to list all repositories in the database, by [@bradrydzewski](https://github.com/bradrydzewski). [#2785](https://github.com/drone/drone/issues/2785).
### Fixed
- improve sync to handle duplicate repository names with different unique identifiers, by [@bradrydzewski](https://github.com/bradrydzewski). [#2658](https://github.com/drone/drone/issues/2658). _You can revert to the previous sync logic with DRONE_DATABASE_LEGACY_BATCH=true_.
## [1.5.1] - 2019-09-30
### Added
- allow organization admins access to organization secret endpoints, by [@bradrydzewski](https://github.com/bradrydzewski). [#2838](https://github.com/drone/drone/issues/2838).

View file

@ -109,7 +109,7 @@ type (
Secret string `envconfig:"DRONE_DATABASE_SECRET"`
// Feature flag
ExperimentalBatch bool `envconfig:"DRONE_DATABASE_EXPERIMENTAL_BATCH"`
LegacyBatch bool `envconfig:"DRONE_DATABASE_LEGACY_BATCH"`
}
// Docker provides docker configuration

View file

@ -135,8 +135,8 @@ func provideUserStore(db *db.DB) core.UserStore {
// provideBatchStore is a Wire provider function that provides a
// batcher. If the experimental batcher is enabled it is returned.
func provideBatchStore(db *db.DB, config config.Config) core.Batcher {
if config.Database.ExperimentalBatch {
return batch2.New(db)
if config.Database.LegacyBatch {
return batch.New(db)
}
return batch.New(db)
return batch2.New(db)
}