[Bug] REPO_INDEXER doesn't index mirrored repository #5299

Closed
opened 2025-11-02 06:20:48 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @ghost on GitHub (Apr 24, 2020).

  • Gitea version (or commit ref): 1.11.4
  • Git version: Not relevant
  • Operating system: docker image
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: Not relevant

Description

The REPO_INDEXER doesn't index the mirrored repository automatically. I have to remove the .bleve every time to start a new reindex for all repositories.

It would be great if the indexing can be triggered manually on a selected repository. Would be better if indexing is automatically triggered after pulling from remotes.

Screenshots

Here is my indexer configuration

[indexer]
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = /data/gitea/indexers/repos.bleve
UPDATE_BUFFER_LEN = 20
MAX_FILE_SIZE = 1048576
REPO_INDEXER_INCLUDE = 
REPO_INDEXER_EXCLUDE = resources/bin/**
Originally created by @ghost on GitHub (Apr 24, 2020). - Gitea version (or commit ref): 1.11.4 - Git version: Not relevant - Operating system: docker image - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: Not relevant ## Description The REPO_INDEXER doesn't index the mirrored repository automatically. I have to remove the `.bleve` every time to start a new reindex for all repositories. It would be great if the indexing can be triggered manually on a selected repository. Would be better if indexing is automatically triggered after pulling from remotes. ## Screenshots Here is my indexer configuration ``` [indexer] ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve REPO_INDEXER_ENABLED = true REPO_INDEXER_PATH = /data/gitea/indexers/repos.bleve UPDATE_BUFFER_LEN = 20 MAX_FILE_SIZE = 1048576 REPO_INDEXER_INCLUDE = REPO_INDEXER_EXCLUDE = resources/bin/** ```
GiteaMirror added the type/bug label 2025-11-02 06:20:48 -06:00
Author
Owner

@ghost commented on GitHub (Apr 30, 2020):

Is it possible to call NotifyPushCommits manually form GUI, or via some command-line?
310699bca7/modules/notification/indexer/indexer.go (L126)

Currently it is only called from repofiles/action.go, not for mirrored commits.
6034f8bcaa/modules/repofiles/action.go (L257)

@ghost commented on GitHub (Apr 30, 2020): Is it possible to call ``NotifyPushCommits`` manually form GUI, or via some command-line? https://github.com/go-gitea/gitea/blob/310699bca71f15cc7b46363800574ba6e74d8c5c/modules/notification/indexer/indexer.go#L126 Currently it is only called from ``repofiles/action.go``, not for mirrored commits. https://github.com/go-gitea/gitea/blob/6034f8bcaaa5348fee775d2307ff03162130a088/modules/repofiles/action.go#L257
Author
Owner

@ghost commented on GitHub (Apr 30, 2020):

For mirrored commits, there is a NotifySyncPushCommits notification.
2677d071f9/services/mirror/mirror.go (L412)

But the implementation seems to be missing in indexer/indexer.go.

There is only one for NotifyPushCommits, not for NotifySyncPushCommits
310699bca7/modules/notification/indexer/indexer.go (L126)

@ghost commented on GitHub (Apr 30, 2020): For mirrored commits, there is a ``NotifySyncPushCommits`` notification. https://github.com/go-gitea/gitea/blob/2677d071f911fb91f382acfedaedc251bd807f70/services/mirror/mirror.go#L412 But the implementation seems to be missing in ``indexer/indexer.go``. There is only one for ``NotifyPushCommits``, not for ``NotifySyncPushCommits`` https://github.com/go-gitea/gitea/blob/310699bca71f15cc7b46363800574ba6e74d8c5c/modules/notification/indexer/indexer.go#L126
Author
Owner

@zeripath commented on GitHub (May 6, 2020):

To me it seems that simply copying the code for NotifyPushCommits would suffice to fix this issue.

@zeripath commented on GitHub (May 6, 2020): To me it seems that simply copying the code for NotifyPushCommits would suffice to fix this issue.
Author
Owner

@ghost commented on GitHub (May 18, 2020):

It seems that this bug wasn't fixed in the 1.11.5 release. Was the backport included in this release?

@ghost commented on GitHub (May 18, 2020): It seems that this bug wasn't fixed in the 1.11.5 release. Was the backport included in this release?
Author
Owner

@zeripath commented on GitHub (May 18, 2020):

83f8414e1e/modules/notification/indexer/indexer.go (L127)

@zeripath commented on GitHub (May 18, 2020): https://github.com/go-gitea/gitea/blob/83f8414e1ee769a62ae813b10f602a800eb76ac5/modules/notification/indexer/indexer.go#L127
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5299