Importing ravendump from RavenDB 3.5 into 4 doesn't work on dump with revisions?

63 views
Skip to first unread message

Bruno Lopes

unread,
Sep 19, 2017, 1:07:17 PM9/19/17
to RavenDB - 2nd generation document database
Steps:
- Create new database
- Go to document revisions
- Create default configuration with all default values (no purge on delete, no limit on count, no limit on age)
- Go to import database, pick file, press import, fails with [1]

Tried to filter out historical docs with [2], still fails.

Was this supposed to work, or have I hit a functionality that's not yet implemented?

This was on "Version 4.0, SemVer 4.0.0-rc-40019, Commit 20e7fb1" with a dump from "Build 35194, Version c619315"

[1]
Error:
[17:00:40 INFO] Started processing Documents.
Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Raven.Server.Documents.Revisions.RevisionsStorage.Put(DocumentsOperationContext context, String id, BlittableJsonReaderObject document, DocumentFlags flags, NonPersistentDocumentFlags nonPersistentFlags, String changeVector, Int64 lastModifiedTicks, RevisionsCollectionConfiguration configuration, CollectionName collectionName) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Revisions\RevisionsStorage.cs:line 298
   at Raven.Server.Smuggler.Documents.DatabaseDestination.MergedBatchPutCommand.Execute(DocumentsOperationContext context) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Smuggler\Documents\DatabaseDestination.cs:line 344
   at Raven.Server.Documents.TransactionOperationsMerger.ExecutePendingOperationsInTransaction(List`1 pendingOps, DocumentsOperationContext context, Task previousOperation, DurationMeasurement& meter) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\TransactionOperationsMerger.cs:line 479
   at Raven.Server.Documents.TransactionOperationsMerger.MergeTransactionsOnce() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\TransactionOperationsMerger.cs:line 227

--- 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 Raven.Server.Documents.TransactionOperationsMerger.<Enqueue>d__17.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\TransactionOperationsMerger.cs:line 82

--- 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 Raven.Client.Util.AsyncHelpers.<>c__DisplayClass0_1.<<RunSync>b__0>d.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Client\Util\AsyncHelpers.cs:line 35

--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Raven.Client.Util.AsyncHelpers.RunSync(Func`1 task) in C:\Builds\RavenDB-4.0-RC\src\Raven.Client\Util\AsyncHelpers.cs:line 46
   at Raven.Server.Smuggler.Documents.DatabaseDestination.DatabaseDocumentActions.FinishBatchOfDocuments() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Smuggler\Documents\DatabaseDestination.cs:line 193
   at Raven.Server.Smuggler.Documents.DatabaseSmuggler.ProcessDocuments(SmugglerResult result, BuildVersionType buildType) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Smuggler\Documents\DatabaseSmuggler.cs:line 335
   at Raven.Server.Smuggler.Documents.DatabaseSmuggler.ProcessType(DatabaseItemType type, SmugglerResult result, BuildVersionType buildType) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Smuggler\Documents\DatabaseSmuggler.cs:line 99
   at Raven.Server.Smuggler.Documents.DatabaseSmuggler.Execute() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Smuggler\Documents\DatabaseSmuggler.cs:line 60
   at Raven.Server.Smuggler.Documents.Handlers.SmugglerHandler.DoImportInternal(DocumentsOperationContext context, Stream stream, DatabaseSmugglerOptions options, SmugglerResult result, Action`1 onProgress, OperationCancelToken token) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Smuggler\Documents\Handlers\SmugglerHandler.cs:line 379
   at Raven.Server.Smuggler.Documents.Handlers.SmugglerHandler.<>c__DisplayClass9_2.<<PostImportAsync>b__1>d.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Smuggler\Documents\Handlers\SmugglerHandler.cs:line 359

--- End of stack trace from previous location where exception was thrown ---

[2]:
function transform(doc) {
  var id = doc['@metadata']['@id'];
  if(doc['@metadata']["Raven-Document-Revision-Status"] ==  "Historical") return null;
  return doc;
}

Oren Eini (Ayende Rahien)

unread,
Sep 19, 2017, 2:56:39 PM9/19/17
to ravendb
Yes, this is supposed to work.
Can you create an issue for that with the import file that is failing?

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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bruno Lopes

unread,
Sep 19, 2017, 5:40:41 PM9/19/17
to ravendb
I'll see if I can get a smaller version to repro. I'd prefer to avoid sharing the entire thing.

I'll create an issue when I've got it.

--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/GA3vLBhG1Yg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.

Bruno Lopes

unread,
Sep 20, 2017, 7:12:59 AM9/20/17
to RavenDB - 2nd generation document database
Done, it's up at http://issues.hibernatingrhinos.com/issue/RavenDB-8703

one detail I noticed : on the error details (when I press details and see the stack trace), if I select and copy the stack trace it duplicates new lines so that the trace ends up looking like [1].
Is it intentional? I ended up squashing the empty duplicated newlines to make for a more compressed trace.
Also, perhaps a "copy trace to clipboard" would help a lot here to better report bugs?

[1]
"""
System.ArgumentNullException: Value cannot be null.

Parameter name: s

   at System.Text.UTF8Encoding.GetByteCount(String chars)

   at Sparrow.ByteStringContext`1.From(String value, ByteStringType type, ByteString& str) in C:\Builds\RavenDB-4.0-RC\src\Sparrow\ByteString.cs:line 1132

   at Raven.Server.Documents.Revisions.RevisionsStorage.Put(DocumentsOperationContext context, String id, BlittableJsonReaderObject document, DocumentFlags flags, NonPersistentDocumentFlags nonPersistentFlags, String changeVector, Int64 lastModifiedTicks, RevisionsCollectionConfiguration configuration, CollectionName collectionName) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Revisions\RevisionsStorage.cs:line 299

Oren Eini (Ayende Rahien)

unread,
Sep 20, 2017, 9:25:09 AM9/20/17
to ravendb
Thanks, we'll look at that next week
Reply all
Reply to author
Forward
0 new messages