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

Crash - same key added #295

Open
johnml1135 opened this issue Jan 31, 2024 · 3 comments
Open

Crash - same key added #295

johnml1135 opened this issue Jan 31, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@johnml1135
Copy link
Collaborator

We got this error on Serval Ext QA, Mon Jan 29th, 7:06 PM

Value: [ var='B0' metric='{app="serval-api", container="serval-api", container_id="689a92c75db67b1735bf52d9b3f078762c6daa6cd07c2e1c7265e1c071887b96", host="kb6", log="fail: Microsoft.AspNetCore.Server.Kestrel[13]\n      Connection id \"0HN0RCC5B6O4B\", Request id \"0HN0RCC5B6O4B:00000009\": An unhandled exception was thrown by the application.\n      System.ArgumentException: An item with the same key has already been added. Key: 65b83d3c725849ee917450da\n         at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)\n         at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)\n         at System.Linq.Enumerable.ToDictionary[TSource,TKey](List`1 source, Func`2 keySelector, IEqualityComparer`1 comparer)\n         at Serval.Translation.Services.EngineService.StartBuildAsync(Build build, CancellationToken cancellationToken) in /app/src/Serval.Translation/Services/EngineService.cs:line 196\n         at Serval.Translation.Services.EngineService.StartBuildAsync(Build build, CancellationToken cancellationToken) in /app/src/Serval.Translation/Services/EngineService.cs:line 265\n         at Serval.Tr", namespace="serval", pod="serval-api-7c4fb9c65c-h2qmf", pod_id="34cc5008-64c6-4703-a0fe-451fec345112", pod_template_hash="7c4fb9c65c",

Two builds start at the same time?

@johnml1135 johnml1135 self-assigned this Jan 31, 2024
@johnml1135 johnml1135 added the bug Something isn't working label Jan 31, 2024
@ddaspit
Copy link
Contributor

ddaspit commented Jan 31, 2024

Looks like the same corpus is referenced multiple times in trainOn or pretranslate properties.

@johnml1135
Copy link
Collaborator Author

johnml1135 commented Feb 1, 2024

Multiple times in each or one in each?
Likely response:

  • If they are added multiple times, just smooth over the error and pretend like it was added once?

@ddaspit
Copy link
Contributor

ddaspit commented Feb 1, 2024

Multiple times in each. I think we should error out with a 400. If the same corpus is specified multiple times, then each could have different settings. It would be unclear which to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants