diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-02-21 06:18:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 16:18:26 -0600 |
commit | d845be661f5205b70d4fa6883e7912a5d2491218 (patch) | |
tree | 2c946a94512cdac7557d4a942acf0377efa583e4 /modules/setting/indexer.go | |
parent | d2128b44f714fcaacdc88865e62f6f9dd8216577 (diff) | |
download | gitea-d845be661f5205b70d4fa6883e7912a5d2491218.tar.gz gitea-d845be661f5205b70d4fa6883e7912a5d2491218.zip |
handle deprecated settings (#22992)
Fix #22736
Diffstat (limited to 'modules/setting/indexer.go')
-rw-r--r-- | modules/setting/indexer.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/setting/indexer.go b/modules/setting/indexer.go index 528a9eb655..5b10018eb7 100644 --- a/modules/setting/indexer.go +++ b/modules/setting/indexer.go @@ -56,12 +56,13 @@ func loadIndexerFrom(rootCfg ConfigProvider) { Indexer.IssueIndexerName = sec.Key("ISSUE_INDEXER_NAME").MustString(Indexer.IssueIndexerName) // The following settings are deprecated and can be overridden by settings in [queue] or [queue.issue_indexer] - // FIXME: DEPRECATED to be removed in v1.18.0 - deprecatedSetting(rootCfg, "indexer", "ISSUE_INDEXER_QUEUE_TYPE", "queue.issue_indexer", "TYPE") - deprecatedSetting(rootCfg, "indexer", "ISSUE_INDEXER_QUEUE_DIR", "queue.issue_indexer", "DATADIR") - deprecatedSetting(rootCfg, "indexer", "ISSUE_INDEXER_QUEUE_CONN_STR", "queue.issue_indexer", "CONN_STR") - deprecatedSetting(rootCfg, "indexer", "ISSUE_INDEXER_QUEUE_BATCH_NUMBER", "queue.issue_indexer", "BATCH_LENGTH") - deprecatedSetting(rootCfg, "indexer", "UPDATE_BUFFER_LEN", "queue.issue_indexer", "LENGTH") + // DEPRECATED should not be removed because users maybe upgrade from lower version to the latest version + // if these are removed, the warning will not be shown + deprecatedSetting(rootCfg, "indexer", "ISSUE_INDEXER_QUEUE_TYPE", "queue.issue_indexer", "TYPE", "v1.19.0") + deprecatedSetting(rootCfg, "indexer", "ISSUE_INDEXER_QUEUE_DIR", "queue.issue_indexer", "DATADIR", "v1.19.0") + deprecatedSetting(rootCfg, "indexer", "ISSUE_INDEXER_QUEUE_CONN_STR", "queue.issue_indexer", "CONN_STR", "v1.19.0") + deprecatedSetting(rootCfg, "indexer", "ISSUE_INDEXER_QUEUE_BATCH_NUMBER", "queue.issue_indexer", "BATCH_LENGTH", "v1.19.0") + deprecatedSetting(rootCfg, "indexer", "UPDATE_BUFFER_LEN", "queue.issue_indexer", "LENGTH", "v1.19.0") Indexer.RepoIndexerEnabled = sec.Key("REPO_INDEXER_ENABLED").MustBool(false) Indexer.RepoType = sec.Key("REPO_INDEXER_TYPE").MustString("bleve") |