sillsdev / serval

A REST API for natural language processing services
MIT License
4 stars 0 forks source link

Crash - same key added #295

Open johnml1135 opened 7 months ago

johnml1135 commented 7 months ago

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?

ddaspit commented 7 months ago

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

johnml1135 commented 7 months ago

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

ddaspit commented 7 months ago

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.