Could not flush indexes properly / Failed to create backup (3781)

111 views
Skip to first unread message

Patrik Potocki

unread,
Sep 1, 2015, 2:44:21 AM9/1/15
to RavenDB - 2nd generation document database
Hello,

Seeing in my logs when upgraded to 3781. How can this error occure ?

Exception
System.IO.IOException: Error during flush for Auto/RavenTimeouts/ByTimeSortByTime ---> System.ComponentModel.Win32Exception: The volume for a file has been externally altered so that the opened file is no longer valid
   at Raven.Database.Indexing.LuceneCodecDirectory.CodecIndexInput..ctor(FileInfo file, Func`2 applyCodecs)
   at Raven.Database.Indexing.LuceneCodecDirectory.OpenInput(String name, Int32 bufferSize)
   at Lucene.Net.Index.SegmentReader.CoreReaders..ctor(SegmentReader origInstance, Directory dir, SegmentInfo si, Int32 readBufferSize, Int32 termsIndexDivisor)
   at Lucene.Net.Index.SegmentReader.Get(Boolean readOnly, Directory dir, SegmentInfo si, Int32 readBufferSize, Boolean doOpenStores, Int32 termInfosIndexDivisor)
   at Lucene.Net.Index.IndexWriter.ReaderPool.Get(SegmentInfo info, Boolean doOpenStores, Int32 readBufferSize, Int32 termsIndexDivisor)
   at Lucene.Net.Index.IndexWriter.ReaderPool.Get(SegmentInfo info, Boolean doOpenStores)
   at Lucene.Net.Index.DocumentsWriter.ApplyDeletes(SegmentInfos infos)
   at Lucene.Net.Index.IndexWriter.ApplyDeletes()
   at Lucene.Net.Index.IndexWriter.DoFlushInternal(Boolean flushDocStores, Boolean flushDeletes)
   at Lucene.Net.Index.IndexWriter.DoFlush(Boolean flushDocStores, Boolean flushDeletes)
   at Lucene.Net.Index.IndexWriter.PrepareCommit(IDictionary`2 commitUserData)
   at Lucene.Net.Index.IndexWriter.Commit(IDictionary`2 commitUserData)
   at Raven.Database.Indexing.RavenIndexWriter.Commit(Etag lastEtag)
   at Raven.Database.Indexing.Index.Flush(Etag highestETag)
   --- End of inner exception stack trace ---
   at Raven.Database.Indexing.Index.Flush(Etag highestETag)
   at Raven.Database.Indexing.IndexStorage.FlushMapIndexes()
   at Raven.Database.Indexing.AbstractIndexingExecuter.<Execute>b__0()


Also getting error when trying to backup:

Failed to create backup! System.IO.IOException: Error during flush for Auto/RavenTimeouts/ByTimeSortByTime ---> System.ComponentModel.Win32Exception: The volume for a file has been externally altered so that the opened file is no longer valid

at Raven.Database.Indexing.LuceneCodecDirectory.CodecIndexInput..ctor(FileInfo file, Func`2 applyCodecs)
   at Raven.Database.Indexing.LuceneCodecDirectory.OpenInput(String name, Int32 bufferSize)
   at Lucene.Net.Index.SegmentReader.CoreReaders..ctor(SegmentReader origInstance, Directory dir, SegmentInfo si, Int32 readBufferSize, Int32 termsIndexDivisor)
   at Lucene.Net.Index.SegmentReader.Get(Boolean readOnly, Directory dir, SegmentInfo si, Int32 readBufferSize, Boolean doOpenStores, Int32 termInfosIndexDivisor)
   at Lucene.Net.Index.IndexWriter.ReaderPool.Get(SegmentInfo info, Boolean doOpenStores, Int32 readBufferSize, Int32 termsIndexDivisor)
   at Lucene.Net.Index.IndexWriter.ReaderPool.Get(SegmentInfo info, Boolean doOpenStores)
   at Lucene.Net.Index.DocumentsWriter.ApplyDeletes(SegmentInfos infos)
   at Lucene.Net.Index.IndexWriter.ApplyDeletes()
   at Lucene.Net.Index.IndexWriter.DoFlushInternal(Boolean flushDocStores, Boolean flushDeletes)
   at Lucene.Net.Index.IndexWriter.DoFlush(Boolean flushDocStores, Boolean flushDeletes)
   at Lucene.Net.Index.IndexWriter.PrepareCommit(IDictionary`2 commitUserData)
   at Lucene.Net.Index.IndexWriter.Commit(IDictionary`2 commitUserData)
   at Raven.Database.Indexing.RavenIndexWriter.Commit(Etag lastEtag)
   at Raven.Database.Indexing.Index.Flush(Etag highestETag)
   --- End of inner exception stack trace ---
   at Raven.Database.Indexing.Index.Flush(Etag highestETag)
   at Raven.Database.Indexing.IndexStorage.FlushMapIndexes()
   at Raven.Database.Actions.MaintenanceActions.StartBackup(String backupDestinationDirectory, Boolean incrementalBackup, DatabaseDocument databaseDocument)
   at Raven.Database.Server.Controllers.Admin.AdminController.<Backup>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()
Internal Server Error



The index look like this: from doc in docs.RavenTimeouts select new { Time = doc.Time }

Oren Eini (Ayende Rahien)

unread,
Sep 1, 2015, 7:14:01 AM9/1/15
to ravendb
Are you running this on a USB drive, or network drive?

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.

Patrik Potocki

unread,
Sep 1, 2015, 9:29:51 AM9/1/15
to RavenDB - 2nd generation document database
Hello,

No .. running on a vm , seems it was something temporary cause now it's working again.

Oren Eini (Ayende Rahien)

unread,
Sep 1, 2015, 10:16:22 AM9/1/15
to ravendb

Looks likenthe volume was disconnected

Oren Eini (Ayende Rahien)

unread,
Sep 6, 2015, 7:24:57 AM9/6/15
to ravendb
We found the error and fixed it. Will be in the next build.
Reply all
Reply to author
Forward
0 new messages