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

EsentWriteConflictException when trying to upload many files in a batch through the UI #35

Closed
samueldjack opened this issue Apr 11, 2012 · 1 comment
Assignees

Comments

@samueldjack
Copy link
Contributor

When I select a lot of files (around 200 in this case) to upload in one go through the U I quite often see some of the files fail to upload, with this exception having been thrown.

System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: System.Net.WebException: The remote server returned an error: NotFound.
at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Func2.Invoke(T arg) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise) {"ExceptionType":"Microsoft.Isam.Esent.Interop.EsentWriteConflictException","Message":"Write lock failed due to outstanding write lock","StackTrace":" at Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) in C:\\Work\\ravendb\\SharedLibs\\Sources\\managedesent-61618\\EsentInterop\\Api.cs:line 2739\r\n at Microsoft.Isam.Esent.Interop.Api.JetDelete(JET_SESID sesid, JET_TABLEID tableid) in C:\\Work\\ravendb\\SharedLibs\\Sources\\managedesent-61618\\EsentInterop\\Api.cs:line 2341\r\n at RavenFS.Storage.StorageActionsAccessor.Delete(String filename) in C:\\Projects\\HibernatingRhinos\\RavenFS\\RavenFS\\RavenFS\\Storage\\StorageActionsAccessor.cs:line 371\r\n at RavenFS.Controllers.FilesController.<>c__DisplayClass21.<Put>b__1c(StorageActionsAccessor accessor) in C:\\Projects\\HibernatingRhinos\\RavenFS\\RavenFS\\RavenFS\\Controllers\\FilesController.cs:line 130\r\n at RavenFS.Storage.TransactionalStorage.ExecuteBatch(Action1 action) in C:\Projects\HibernatingRhinos\RavenFS\RavenFS\RavenFS\Storage\TransactionalStorage.cs:line 244\r\n at RavenFS.Storage.TransactionalStorage.Batch(Action1 action) in C:\\Projects\\HibernatingRhinos\\RavenFS\\RavenFS\\RavenFS\\Storage\\TransactionalStorage.cs:line 222\r\n at RavenFS.Controllers.FilesController.Put(String name) in C:\\Projects\\HibernatingRhinos\\RavenFS\\RavenFS\\RavenFS\\Controllers\\FilesController.cs:line 128\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.Execute(HttpControllerContext controllerContext, IDictionary2 arguments)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<>c__DisplayClass2.b__0()\r\n at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func1 func, CancellationToken cancellationToken)","InnerException":null} at RavenFS.Client.ExceptionExtensions.<TryThrowBetteError>b__0(Task task) at System.Threading.Tasks.ContinuationResultTaskFromTask1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.InvalidOperationException: System.Net.WebException: The remote server returned an error: NotFound.
at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Func2.Invoke(T arg) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise) {"ExceptionType":"Microsoft.Isam.Esent.Interop.EsentWriteConflictException","Message":"Write lock failed due to outstanding write lock","StackTrace":" at Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) in C:\Work\ravendb\SharedLibs\Sources\managedesent-61618\EsentInterop\Api.cs:line 2739\r\n at Microsoft.Isam.Esent.Interop.Api.JetDelete(JET_SESID sesid, JET_TABLEID tableid) in C:\Work\ravendb\SharedLibs\Sources\managedesent-61618\EsentInterop\Api.cs:line 2341\r\n at RavenFS.Storage.StorageActionsAccessor.Delete(String filename) in C:\Projects\HibernatingRhinos\RavenFS\RavenFS\RavenFS\Storage\StorageActionsAccessor.cs:line 371\r\n at RavenFS.Controllers.FilesController.<>c__DisplayClass21.<Put>b__1c(StorageActionsAccessor accessor) in C:\Projects\HibernatingRhinos\RavenFS\RavenFS\RavenFS\Controllers\FilesController.cs:line 130\r\n at RavenFS.Storage.TransactionalStorage.ExecuteBatch(Action1 action) in C:\Projects\HibernatingRhinos\RavenFS\RavenFS\RavenFS\Storage\TransactionalStorage.cs:line 244\r\n at RavenFS.Storage.TransactionalStorage.Batch(Action1 action) in C:\Projects\HibernatingRhinos\RavenFS\RavenFS\RavenFS\Storage\TransactionalStorage.cs:line 222\r\n at RavenFS.Controllers.FilesController.Put(String name) in C:\Projects\HibernatingRhinos\RavenFS\RavenFS\RavenFS\Controllers\FilesController.cs:line 128\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.Execute(HttpControllerContext controllerContext, IDictionary2 arguments)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<>c__DisplayClass2.b__0()\r\n at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func1 func, CancellationToken cancellationToken)","InnerException":null} at RavenFS.Client.ExceptionExtensions.<TryThrowBetteError>b__0(Task task) at System.Threading.Tasks.ContinuationResultTaskFromTask1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()<---

@ayende
Copy link
Member

ayende commented Apr 12, 2012

Known issue, already fixed in the replication branch, when we merge it, you won't see the error.

@ayende ayende closed this as completed Apr 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants