You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
Gorse version
Version: unknown-version
API version: v0.2.7
Go version: go1.23.1
Git commit: unknown-commit
Built: unknown-buildtime
OS/Arch: windows/amd64
Describe the bug
When it is first started, MySQL stores the data_cache, records the user, item, and feedback, and after starting, it is found that the master calculates the score and writes it to the cache database, and then after the worker gets up, when the score is calculated and written to the cache database, it will judge that the score of the data is inconsistent, resulting in panic,
Why this is the case is a question that must arise
The location of the code where the error occurred
func (aggregator *DocumentAggregator) Add(category string, values []string, scores []float64) {
for i, value := range values {
if _, ok := aggregator.Documents[value]; !ok {
aggregator.Documents[value] = &Document{
Id: value,
Score: scores[i],
Categories: []string{category},
Timestamp: aggregator.Timestamp,
}
} else {
if aggregator.Documents[value].Score != scores[i] {
//bug here
panic("score should be the same")
}
aggregator.Documents[value].Categories = append(aggregator.Documents[value].Categories, category)
}
}
}
The text was updated successfully, but these errors were encountered:
Please answer these questions before submitting your issue. Thanks!
Gorse version
Version: unknown-version
API version: v0.2.7
Go version: go1.23.1
Git commit: unknown-commit
Built: unknown-buildtime
OS/Arch: windows/amd64
Describe the bug
When it is first started, MySQL stores the data_cache, records the user, item, and feedback, and after starting, it is found that the master calculates the score and writes it to the cache database, and then after the worker gets up, when the score is calculated and written to the cache database, it will judge that the score of the data is inconsistent, resulting in panic,
Why this is the case is a question that must arise
The location of the code where the error occurred
func (aggregator *DocumentAggregator) Add(category string, values []string, scores []float64) {
for i, value := range values {
if _, ok := aggregator.Documents[value]; !ok {
aggregator.Documents[value] = &Document{
Id: value,
Score: scores[i],
Categories: []string{category},
Timestamp: aggregator.Timestamp,
}
} else {
if aggregator.Documents[value].Score != scores[i] {
//bug here
panic("score should be the same")
}
aggregator.Documents[value].Categories = append(aggregator.Documents[value].Categories, category)
}
}
}
The text was updated successfully, but these errors were encountered: