[PR #3366] [MERGED] Asynchronously populate the repo indexer #16907

Closed
opened 2025-11-02 12:21:52 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3366
Author: @ethantkoenig
Created: 1/14/2018
Status: Merged
Merged: 1/14/2018
Merged by: @lafriks

Base: masterHead: async_populate_repo_indexer


📝 Commits (3)

📊 Changes

1 file changed (+41 additions, -17 deletions)

View changed files

📝 models/repo_indexer.go (+41 -17)

📄 Description

Previously, the initial creation and population of the repo indexer occurred synchronously during startup, so that gitea was not accessible until the indexer was fully populated.

Since populating the indexer can take a while (several minutes, or even longer), it is better to populate the indexer asynchronously, so that gitea is immediately accessible. Creating the indexer is fast, so we continue to do that synchronously for simplicity.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/3366 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 1/14/2018 **Status:** ✅ Merged **Merged:** 1/14/2018 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `async_populate_repo_indexer` --- ### 📝 Commits (3) - [`7b1b7fc`](https://github.com/go-gitea/gitea/commit/7b1b7fc8d914c69235b47ba01eacbc344382d134) Populate repo indexer in background - [`8b9fd3e`](https://github.com/go-gitea/gitea/commit/8b9fd3e0ef397821e87dbefff6768344e4c928fa) Check if no repos exist - [`1383c62`](https://github.com/go-gitea/gitea/commit/1383c62acfee4b359119ea724227c5a65ea5cd36) race cond ### 📊 Changes **1 file changed** (+41 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `models/repo_indexer.go` (+41 -17) </details> ### 📄 Description Previously, the initial creation and population of the repo indexer occurred synchronously during startup, so that gitea was not accessible until the indexer was fully populated. Since populating the indexer can take a while (several minutes, or even longer), it is better to populate the indexer asynchronously, so that gitea is immediately accessible. Creating the indexer is fast, so we continue to do that synchronously for simplicity. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:21:52 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16907