20:25 [Error] () Exception in subscription
Raven.Client.Exceptions.RavenException: 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-Stable-4.0\src\Raven.Server\Documents\Revisions\RevisionsStorage.cs:line 349 at Raven.Server.Documents.DocumentPutAction.PutDocument(DocumentsOperationContext context, String id, String expectedChangeVector, BlittableJsonReaderObject document, Nullable`1 lastModifiedTicks, String changeVector, DocumentFlags flags, NonPersistentDocumentFlags nonPersistentFlags) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Documents\DocumentPutAction.cs:line 153 at Raven.Server.Documents.Handlers.BatchHandler.MergedBatchCommand.Execute(DocumentsOperationContext context) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Documents\Handlers\BatchHandler.cs:line 311 at Raven.Server.Documents.TransactionOperationsMerger.RunEachOperationIndependently(List`1 pendingOps) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Documents\TransactionOperationsMerger.cs:line 787--- End of stack trace from previous location where exception was thrown --- at Raven.Server.Documents.TransactionOperationsMerger.Enqueue(MergedTransactionCommand cmd) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Documents\TransactionOperationsMerger.cs:line 93 at Raven.Server.Documents.Handlers.BatchHandler.BulkDocs() in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Documents\Handlers\BatchHandler.cs:line 55 at Raven.Server.Routing.RequestRouter.HandlePath(HttpContext context, String method, String path) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Routing\RequestRouter.cs:line 116 at Raven.Server.RavenServerStartup.RequestHandler(HttpContext context) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\RavenServerStartup.cs:line 161 ---> System.NullReferenceException: 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-Stable-4.0\src\Raven.Server\Documents\Revisions\RevisionsStorage.cs:line 349 at Raven.Server.Documents.DocumentPutAction.PutDocument(DocumentsOperationContext context, String id, String expectedChangeVector, BlittableJsonReaderObject document, Nullable`1 lastModifiedTicks, String changeVector, DocumentFlags flags, NonPersistentDocumentFlags nonPersistentFlags) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Documents\DocumentPutAction.cs:line 153 at Raven.Server.Documents.Handlers.BatchHandler.MergedBatchCommand.Execute(DocumentsOperationContext context) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Documents\Handlers\BatchHandler.cs:line 311 at Raven.Server.Documents.TransactionOperationsMerger.RunEachOperationIndependently(List`1 pendingOps) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Documents\TransactionOperationsMerger.cs:line 787--- End of stack trace from previous location where exception was thrown --- at Raven.Server.Documents.TransactionOperationsMerger.Enqueue(MergedTransactionCommand cmd) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Documents\TransactionOperationsMerger.cs:line 93 at Raven.Server.Documents.Handlers.BatchHandler.BulkDocs() in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Documents\Handlers\BatchHandler.cs:line 55 at Raven.Server.Routing.RequestRouter.HandlePath(HttpContext context, String method, String path) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Routing\RequestRouter.cs:line 116 at Raven.Server.RavenServerStartup.RequestHandler(HttpContext context) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\RavenServerStartup.cs:line 161 --- End of inner exception stack trace --- at Raven.Client.Exceptions.ExceptionDispatcher.Throw(JsonOperationContext context, HttpResponseMessage response, Action`1 additionalErrorInfo) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Client\Exceptions\ExceptionDispatcher.cs:line 108 at Raven.Client.Http.RequestExecutor.HandleUnsuccessfulResponse[TResult](ServerNode chosenNode, Nullable`1 nodeIndex, JsonOperationContext context, RavenCommand`1 command, HttpRequestMessage request, HttpResponseMessage response, String url, SessionInfo sessionInfo, Boolean shouldRetry) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Client\Http\RequestExecutor.cs:line 1017 at Raven.Client.Http.RequestExecutor.ExecuteAsync[TResult](ServerNode chosenNode, Nullable`1 nodeIndex, JsonOperationContext context, RavenCommand`1 command, Boolean shouldRetry, SessionInfo sessionInfo, CancellationToken token) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Client\Http\RequestExecutor.cs:line 764 at Raven.Client.Http.RequestExecutor.ExecuteAsync[TResult](ServerNode chosenNode, Nullable`1 nodeIndex, JsonOperationContext context, RavenCommand`1 command, Boolean shouldRetry, SessionInfo sessionInfo, CancellationToken token) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Client\Http\RequestExecutor.cs:line 804 at Raven.Client.Util.AsyncHelpers.RunSync(Func`1 task) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Client\Util\AsyncHelpers.cs:line 79 at Raven.Client.Documents.Session.DocumentSession.SaveChanges() in C:\Builds\RavenDB-Stable-4.0\src\Raven.Client\Documents\Session\DocumentSession.cs:line 79 at Sogyo.Eventsourcing.RavenDb.GlobalEventNumber.AddGlobalEventNumberSubscription.<>c__DisplayClass2_0.<Start>b__0(SubscriptionBatch`1 batch) in /home/arnodenuijl/projects/Eventsourcing4/Sogyo.Eventsourcing.RavenDb/GlobalEventNumber/AddGlobalEventNumberSubscription.cs:line 96
documentStore.Maintenance.Server.Send(new CreateDatabaseOperation(new DatabaseRecord(DatabaseName)
{ Revisions = new RevisionsConfiguration { Default = new RevisionsCollectionConfiguration() } }));var sub = documentStore.Subscriptions.GetSubscriptionWorker(GlobaleventnumbersubscriptionName);sub.Run(batch =>{ try { using (var session = documentStore.OpenSession()) { foreach (var batchedItem in batch.Items) { if(SomeCondition(batchedItem)) { var globalEventNumber = GetNewGlobalEventNumber(); var command = new PatchCommandData( batchedItem.Id, batchedItem.ChangeVector, new PatchRequest { Script = $"this['@metadata']['GlobalEventNumber']={globalEventNumber};" }, null ); session.Advanced.Defer(command); } } session.SaveChanges(); } } catch (Exception e) { _logger.ErrorException("Exception in subscription", e); throw; }});Hibernating Rhinos Ltd
Oren Eini l CEO l 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.
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
Based on some Console.Writeline debugging it appears the null comes from
var header = (TreeRootHeader*)_lowLevelTransaction.RootObjects.DirectRead(treeName); _trees.Add(treeName, null);
return null;
Yes, there is no table, but there _must_ be a table, because we call ensure
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
On Tue, Aug 7, 2018 at 11:41 AM, Arno den Uijl <arnod...@gmail.com> wrote:
Based on some Console.Writeline debugging it appears the null comes from
--
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.
| RevisionsSchema.Create(tx, tableName, 16); |
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
using (_lowLevelTransaction.RootObjects.DirectAdd(name, len, out byte* ptr))
tree.State.CopyTo((TreeRootHeader*)ptr);
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811