Free cookie consent management tool by TermsFeed Policy Generator

Opened 11 years ago

Closed 11 years ago

#2087 closed defect (done)

HiveException: Add task fails with: The query results cannot be enumerated more than once.

Reported by: ascheibe Owned by: ascheibe
Priority: medium Milestone: HeuristicLab 3.3.9
Component: Hive.Server Version: 3.3.8
Keywords: Cc:

Description

System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The query results cannot be enumerated more than once. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.InvalidOperationException: The query results cannot be enumerated more than once.
   at System.Data.Linq.SqlClient.SqlProvider.OneTimeEnumerable`1.GetEnumerator()
   at HeuristicLab.Services.Hive.DataAccess.HiveDao.AssignJobToResource(Guid taskId, IEnumerable`1 resourceIds) in C:\dev\trunk\sources\HeuristicLab.Services.Hive\3.3\HiveDao.cs:line 640
   at HeuristicLab.Services.Hive.HiveService.<>c__DisplayClass3.<AddTask>b__1() in C:\dev\trunk\sources\HeuristicLab.Services.Hive\3.3\HiveService.cs:line 78
   at HeuristicLab.Services.Hive.DataAccess.TransactionManager.UseTransaction[T](Func`1 call, Boolean repeatableRead, Boolean longRunning) in C:\dev\trunk\sources\HeuristicLab.Services.Hive.DataAccess\3.3\TransactionManager.cs:line 52
   at HeuristicLab.Services.Hive.HiveService.AddTask(Task task, TaskData taskData, IEnumerable`1 resourceIds) in C:\dev\trunk\sources\HeuristicLab.Services.Hive\3.3\HiveService...). - will try again!
24-Jul-13 5:22:15 PM    Failed to add task: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The query results cannot be enumerated more than once. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.InvalidOperationException: The query results cannot be enumerated more than once.
   at System.Data.Linq.SqlClient.SqlProvider.OneTimeEnumerable`1.GetEnumerator()
   at HeuristicLab.Services.Hive.DataAccess.HiveDao.AssignJobToResource(Guid taskId, IEnumerable`1 resourceIds) in C:\dev\trunk\sources\HeuristicLab.Services.Hive\3.3\HiveDao.cs:line 640
   at HeuristicLab.Services.Hive.HiveService.<>c__DisplayClass3.<AddTask>b__1() in C:\dev\trunk\sources\HeuristicLab.Services.Hive\3.3\HiveService.cs:line 78
   at HeuristicLab.Services.Hive.DataAccess.TransactionManager.UseTransaction[T](Func`1 call, Boolean repeatableRead, Boolean longRunning) in C:\dev\trunk\sources\HeuristicLab.Services.Hive.DataAccess\3.3\TransactionManager.cs:line 52
   at HeuristicLab.Services.Hive.HiveService.AddTask(Task task, TaskData taskData, IEnumerable`1 resourceIds) in C:\dev\trunk\sources\HeuristicLab.Services.Hive\3.3\HiveService...). - will try again!

Change History (5)

comment:1 Changed 11 years ago by ascheibe

  • Status changed from new to accepted

comment:2 Changed 11 years ago by ascheibe

The fix for this problem seems to be to add a .ToList() to the query. See http://stackoverflow.com/questions/5723555/the-result-of-a-query-cannot-be-enumerated-more-than-once

comment:3 Changed 11 years ago by ascheibe

  • Owner changed from ascheibe to bburlacu
  • Status changed from accepted to reviewing

r9751 fixed exception when adding tasks in Hive

comment:4 Changed 11 years ago by bburlacu

  • Owner changed from bburlacu to ascheibe
  • Status changed from reviewing to readytorelease

Seems fine now.

comment:5 Changed 11 years ago by ascheibe

  • Resolution set to done
  • Status changed from readytorelease to closed

Thanks! r9800: merged r9751 into stable branch

Note: See TracTickets for help on using tickets.