We've encountered an odd situation and I'm hoping someone can tell me what we're doing wrong.
Raven 2261
2 servers, Master -> Slave
The short version is, the call to Store() seems to hang and by hang I mean executing in the debugger stops at that point, but the thread is still active according to the Threads window. No exceptions are received in the calling code.
While waiting for the call session.store() to return, the following things are being logged over and over and over again on the servers.
Master:
2013-02-27 12:01:17.9690,Raven.Database.Server.HttpServer,Warn,Error on request,"Raven.Abstractions.Exceptions.ConcurrencyException: PUT attempted on document 'Raven/Hilo/managers' using a non current etag
at Raven.Storage.Esent.StorageActions.DocumentStorageActions.EnsureDocumentEtagMatch(String key, Nullable`1 etag, String method) in c:\Builds\RavenDB-Stable\Raven.Database\Storage\Esent\StorageActions\Util.cs:line 37
at Raven.Storage.Esent.StorageActions.DocumentStorageActions.AddDocument(String key, Nullable`1 etag, RavenJObject data, RavenJObject metadata) in c:\Builds\RavenDB-Stable\Raven.Database\Storage\Esent\StorageActions\Documents.cs:line 399
at Raven.Database.DocumentDatabase.<>c__DisplayClass46.<Put>b__3f(IStorageActionsAccessor actions) in c:\Builds\RavenDB-Stable\Raven.Database\DocumentDatabase.cs:line 686
at Raven.Storage.Esent.TransactionalStorage.ExecuteBatch(Action`1 action) in c:\Builds\RavenDB-Stable\Raven.Database\Storage\Esent\TransactionalStorage.cs:line 558
at Raven.Storage.Esent.TransactionalStorage.Batch(Action`1 action) in c:\Builds\RavenDB-Stable\Raven.Database\Storage\Esent\TransactionalStorage.cs:line 516
at Raven.Database.DocumentDatabase.Put(String key, Nullable`1 etag, RavenJObject document, RavenJObject metadata, TransactionInformation transactionInformation) in c:\Builds\RavenDB-Stable\Raven.Database\DocumentDatabase.cs:line 675
at Raven.Database.Server.Responders.Document.Put(IHttpContext context, String docId) in c:\Builds\RavenDB-Stable\Raven.Database\Server\Responders\Document.cs:line 176
at Raven.Database.Server.Responders.Document.Respond(IHttpContext context) in c:\Builds\RavenDB-Stable\Raven.Database\Server\Responders\Document.cs:line 50
at Raven.Database.Server.HttpServer.DispatchRequest(IHttpContext ctx) in c:\Builds\RavenDB-Stable\Raven.Database\Server\HttpServer.cs:line 856
at Raven.Database.Server.HttpServer.HandleActualRequest(IHttpContext ctx) in c:\Builds\RavenDB-Stable\Raven.Database\Server\HttpServer.cs:line 601"
2013-02-27 12:01:17.9690,Raven.Database.Server.HttpServer,Debug,"Request #3,942,543: PUT - 245 ms - celljournalist - 409 - /docs/Raven/Hilo/managers",
Slave:
2013-02-27 11:48:25.2816,Raven.Storage.Esent.StorageActions.DocumentStorageActions,Debug,Document with key 'Raven/Hilo/managers' was found,
2013-02-27 11:48:25.2816,Raven.Storage.Esent.StorageActions.DocumentStorageActions,Debug,Document with key 'Raven/ServerPrefixForHilo' was not found,
2013-02-27 11:48:25.2816,Raven.Database.Server.HttpServer,Debug,"Request #73,411: GET - 0 ms - celljournalist - 304 - /queries/?&id=Raven/Hilo/managers&id=Raven/ServerPrefixForHilo",
This is how we create the document store in StructureMap
public RavendbRegistry()
{
For<IDocumentStore>().Singleton().Use(CreateDocumentStore);
For<IDocumentSession>().HybridHttpOrThreadLocalScoped().Use(ctx => ctx.GetInstance<IDocumentStore>().OpenSession());
}
private static DocumentStore CreateDocumentStore()
{
var store = new DocumentStore
{
ConnectionStringName = "RavenDB",
// DefaultDatabase = "CellJournalist",
Conventions =
{
FailoverBehavior = FailoverBehavior.ReadFromAllServers
}
};
store.Initialize();
return store;
}
And this is the code that is attempting to save the new manager record.
using (var session = DocumentStore.OpenSession())
{
var newManager = new Manager()
{
MemberId = request.MemberId,
UserName = member.UserName,
Email = member.Email,
FirstName = member.FirstName,
LastName = member.LastName,
PasswordHash = defaultPassword,
Salt = salt,
Partitions = userPartition,
CurrentPartitionId = partition.Id,
Permissions = DefaultPermission
};
session.Store(newManager);
session.SaveChanges();
}
session.Store(newManager) is where execution stops and all of those log messages start piling up.
We have other document types stored in Raven where specify the id when we first insert the object, this issue is only happening on the 2 document types where we let Raven set the Id. My gut tells me what we're doing something wrong, I'm just not sure what.
Any ideas?
--
You received this message because you are subscribed to the Google Groups "ravendb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to a topic in the Google Groups "ravendb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/yKOHoFih2qE/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "ravendb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
Singleton().Use(CreateDocumentStore);
For<IDocumentSession>().HybridHttpOrThreadLocalScoped().Use(ctx => ctx.GetInstance<IDocumentStore>().OpenSession());
}
private static DocumentStore CreateDocumentStore()
{
var store = new DocumentStore
{
ConnectionStringName = "RavenDB",
Conventions =
{
FailoverBehavior = FailoverBehavior.ReadFromAllServers
}
};
store.Initialize();
return store;
}