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
When running an indexing job for Algolia, we experience this an InvalidOperationException error intermittently.
The code is the following:
var batchResponses = await _client.SaveObjectsAsync(_indexName, dtos, cancellationToken: _token);
var taskResponses = new List<GetTaskResponse>();
foreach (var batchResponse in batchResponses)
{
var taskResponse = await _client.WaitForTaskAsync(_indexName, batchResponse.TaskID, ct: _token);
taskResponses.Add(taskResponse);
}
return taskResponses.Any(x => x.Status == TaskStatus.NotPublished);
From the stacktrace (that is added in the log output), it is an issue in the HttpRequestHeadersExtensions.Fill method probably comes from AlgoliaHttpRequester.SendRequestAsync line 70 ( httpRequestMessage.Headers.Fill(request.Headers); )
Client
Search
Version
7.4.1
Relevant log output
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
at Algolia.Search.Http.HttpRequestHeadersExtensions.Fill(HttpRequestHeaders headers, IDictionary`2 dictionary) at Algolia.Search.Http.AlgoliaHttpRequester.<SendRequestAsync>d__3.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Algolia.Search.Transport.HttpTransport.<ExecuteRequestAsync>d__10`2.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Algolia.Search.Transport.HttpTransport.<ExecuteRequestAsync>d__8`1.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Algolia.Search.Clients.SearchClient.<GetTaskAsync>d__72.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Algolia.Search.Clients.SearchClient.<>c__DisplayClass131_0.<<WaitForTaskAsync>b__0>d.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Algolia.Search.Clients.SearchClient.<RetryUntil>d__149`1.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Algolia.Search.Clients.SearchClient.<WaitForTaskAsync>d__131.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at <<REDACTED>>.Algolia.AlgoliaIndexingJob.<CheckIfPublishedNotCompleted>d__55.MoveNext() in<<REDACTED>>--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at <<REDACTED>>.Algolia.AlgoliaIndexingJob.<IndexBatch>d__42.MoveNext() in <<REDACTED>>
The text was updated successfully, but these errors were encountered:
Description
When running an indexing job for Algolia, we experience this an InvalidOperationException error intermittently.
The code is the following:
From the stacktrace (that is added in the log output), it is an issue in the HttpRequestHeadersExtensions.Fill method probably comes from AlgoliaHttpRequester.SendRequestAsync line 70 ( httpRequestMessage.Headers.Fill(request.Headers); )
Client
Search
Version
7.4.1
Relevant log output
The text was updated successfully, but these errors were encountered: