Lock on Database hard-delete

157 views
Skip to first unread message

Georg Müller

unread,
Oct 16, 2015, 9:49:23 AM10/16/15
to RavenDB - 2nd generation document database
Hi,

we have Web-Tests (aka Selenium) using an installed RavenDb Server (as windows service)

Some of these tests want to delete the database an set it up again. Sometimes this fails because of a lock during the delete.

Url: "/admin/databases/TestDB?hard-delete=true"

System.IO.IOException: The following processes are locking C:\Raven\Databases\TestDB\Data
 Raven.Server 3132

at Raven.Database.Extensions.IOExtensions.TryHandlingError(String directory, Int32 i, Exception e)
   at Raven.Database.Extensions.IOExtensions.DeleteDirectory(String directory)
   at Raven.Database.Server.Controllers.Admin.AdminDatabasesController.DeleteDatabase(String databaseId, Boolean isHardDeleteNeeded)
   at Raven.Database.Server.Controllers.Admin.AdminDatabasesController.DatabasesDelete(String id)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)


Is there a more reliable way to delete the database.
I already tried to re-issue the request up to 4 times.

But this does not make it reliable.

Regards

Oren Eini (Ayende Rahien)

unread,
Oct 16, 2015, 9:50:56 AM10/16/15
to ravendb
You are creating the same db as the one you are deleting?

The hard delete is going to delete the files, but if you create another db in the same name, you are going to mess it up.

Use in memory db for tests.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages