I can't seem to find the equivalent of WaitForNonStaleResultsAsOfNow()
in RavenDB 4 .NET Client API.
In previous versions this was available through IRavenQueryable.Customize()
, but now it contains only WaitForNonStaleResultsAsOf()
and WaitForNonStaleResults()
. The WaitForNonStaleResultsAsOf()
accepts only an ETag and no DateTime.
Also, I tried looking for WaitForNonStaleResultsAsOfLastWrite()
, but couldn't find that either. And I couldn't replicate the behaviour myself by using IDocumentStore.GetLastWrittenEtag()
since it is not present in 4.0.
Digging around a bit more I found that the last ETag would be available on the Raven.Client.Documents.Operations.DatabaseStatistics
-object received as a response of the Raven.Client.Documents.Commands.GetStatisticsCommand
... But I can't figure out how to issue this command in 4.0 either :(
Any help on achieving this in RavenDB 4 would be greatly appreciated.
In v4.0 you should only use
WaitForNonStaleResults
. It will work exactly as theWaitForNonStaleResultsAsOfNow
was working. It is asking the server to wait on the query until the currently max etag of all the collections in the query.WaitForNonStaleResultsAsOf
is going to be removed from the client: http://issues.hibernatingrhinos.com/issue/RavenDB-9678