ravendb/ravendb — Issue #459: NullReferenceException on session.Load([])
Author: lanwin
Created: 2012-02-16 08:41:21+00:00
State: open

First our scenario. We use a simple object to check if we already have processed a given key. So FooKey is only a simple combined key. This function below is executed from multiple threads.

using(var session = _documentStore.OpenSession())
{
using(var tx = new TransactionScope())
{
session.Advanced.NonAuthoritativeInformationTimeout = TimeSpan.FromSeconds(30);
session.Advanced.AllowNonAuthoritativeInformation = false;

var x = session.Load("169833668456615936_71849"); // works and returns null

var y = session.Load(new[] { "169833668456615936_71849" }); // throws

.............
}
}

Stacktrace:
at Raven.Client.Document.SessionOperations.MultiLoadOperation.b__0(JsonDocument x) in c:\Builds\raven\Raven.Client.Lightweight\Document\SessionOperations\MultiLoadOperation.cs:line 64

Ive tested that with an older server version and with the newest 616 version. Client version is 616.

Ive also tried to write a reproducing test, but I was not able to reproduce it there. While in our app i can reproduce it on every run.