Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to update language stats for ID and stats queue indexer.Index(1424) failed #24896

Closed
hiifong opened this issue May 24, 2023 · 5 comments · Fixed by #24900
Closed

Unable to update language stats for ID and stats queue indexer.Index(1424) failed #24896

hiifong opened this issue May 24, 2023 · 5 comments · Fixed by #24900
Labels
Milestone

Comments

@hiifong
Copy link
Contributor

hiifong commented May 24, 2023

Description

I mirrored the repository,Every time I restart gitea will report some error.

  1. Unable to update language stats for ID
  2. stats queue indexer.Index(1424) failed

image

Gitea Version

v1.20+

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu

How are you running Gitea?

./gitea web

Database

MySQL

@wxiaoguang
Copy link
Contributor

Unrelated problem: it seems that you use "conn" mode for your loggers , which is not correctly configured. I guess you could remove the "conn" mode for loggers.

For the duplicate key problem, is it possible to debug what the content of statsmap is in the UpdateLanguageStats, and what are the lagnuage_stat database records for the repo 1424 ?

@wxiaoguang
Copy link
Contributor

OK, reproduced. The problem is this:

stats = {map[string]int64} 
 0 = Shell -> 5131
 1 = Java -> 961174
 2 = java -> 6992114
 3 = PHP -> 15460
 4 = SCSS -> 66518
 5 = PLpgSQL -> 266014
 6 = Groovy -> 2134

@hiifong
Copy link
Contributor Author

hiifong commented May 24, 2023

What should I do for the second question?

@wxiaoguang
Copy link
Contributor

Nothing to do, it will be fixed by Merge different langauges for language stats #24900

@lunny lunny added outdated/backport/v1.19 This PR should be backported to Gitea 1.19 and removed outdated/backport/v1.19 This PR should be backported to Gitea 1.19 labels May 24, 2023
@lunny lunny added this to the 1.19.4 milestone May 24, 2023
@hiifong
Copy link
Contributor Author

hiifong commented May 24, 2023

thank you

techknowlogick pushed a commit that referenced this issue May 24, 2023
Fix #24896

If users set different languages by `linguist-language`, the `stats` map
could be: `java: 100, Java: 200`.

Language stats are stored as case-insensitive in database and there is a
unique key.

So, the different language names should be merged to one unique name:
`Java: 300`
wxiaoguang added a commit to wxiaoguang/gitea that referenced this issue May 25, 2023
Fix go-gitea#24896

If users set different languages by `linguist-language`, the `stats` map
could be: `java: 100, Java: 200`.

Language stats are stored as case-insensitive in database and there is a
unique key.

So, the different language names should be merged to one unique name:
`Java: 300`
silverwind pushed a commit that referenced this issue May 25, 2023
Backport #24900

Fix #24896

If users set different languages by `linguist-language`, the `stats` map
could be: `java: 100, Java: 200`.

Language stats are stored as case-insensitive in database and there is a
unique key.

So, the different language names should be merged to one unique name:
`Java: 300`
Codeberg-org pushed a commit to Codeberg-org/gitea that referenced this issue Jun 3, 2023
…ea#24921)

Backport go-gitea#24900

Fix go-gitea#24896

If users set different languages by `linguist-language`, the `stats` map
could be: `java: 100, Java: 200`.

Language stats are stored as case-insensitive in database and there is a
unique key.

So, the different language names should be merged to one unique name:
`Java: 300`

(cherry picked from commit a83d597)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants