I get this popping up in my log files:
2012-09-24 04:22:29.7905,Raven.Database.Server.HttpServer,Warn,Error on request,"Raven.Abstractions.Exceptions.ConcurrencyException: PUT attempted on document 'clicks/34921' using a non current etag
As you can see in the attached log file (RavenDBLog.txt) the document with the ID 'clicks/34921' is added multiple times during the same SaveChange, it only happens in the live environment, and not every time.
Sorry for sending such a big part of the RavenDBLog, but I wanted to send everything that happened in that burst of updates.
There are two objects involved, the Visit object, and the Click object (that holds a reference to the Visit object for Map/Reduce reasons):
public class Visit : IMetaDataHolder
{
public string Id { get; set; }
public MetaData MetaData { get; set; }
public string Version { get; set; }
public string MediaSource { get; set; }
public string Campaign { get; set; }
public string AdGroup { get; set; }
public string Keyword { get; set; }
public string Domain { get; set; }
public string Page { get; set; }
public string QueryString { get; set; }
public string IPAddress { get; set; }
public string Browser { get; set; }
public string Referrer { get; set; }
public string UserAgent { get; set; }
public bool Secure { get; set; }
public string AgentBot { get; set; }
public string SearchPositionString { get; set; }
public Guid? CustomerGUID { get; set; }
public bool CookiesDisabled { get; set; }
public Guid Guid { get; set; }
public Guid? PreviousGuid { get; set; }
}
public class Click : IMetaDataHolder
{
public string Id { get; set; }
public MetaData MetaData { get; set; }
public Visit Visit { get; set; }
public string SearchId { get; set; }
public string ProductCode { get; set; }
public int ProductScore { get; set; }
}
The insert is done with a request-wide IDocumentSession supplied by structure map to implement the Unit of Work pattern.
This is just one example of a number of similar problems, in my client it usually looks something like in the ClientLog.txt. Since I always pass on a reference to the Visit object in the other cases too that's where my search is directed now. One is allowed to do this, right? To store objects from other documents in a separate aggregate root document?
Any ideas about what might be the problem?
And what's with the "Collection was modified; enumeration operation may not execute."? I'm not doing anything asynchronous in the requests, so this shouldn't happen, right?
Running RavenDB Server Build 960, and the corresponding client (1.0.960).