title: RavenDB: Raven.Abstractions.Exceptions.ConcurrencyException: A document with key: 'cache-fncwr10b' is currently created in another transaction
body: <p><strong>Issue context:</strong>
  Have a piece of code that's trying to add a new document to RavenDB in an NServiceBus message handler.</p>
  
  <p><strong>The code:</strong></p>
  
  <pre><code>partial void HandleImplementation(SomeMessage message)
  {
      PutDataIntoCache(message.CacheKey, message.Document);
  }
  
  void PutDataIntoCache(string key, Document document)
  {
      using (var documentStore = new DocumentStore { Url = "http://localhost:8084" })
      {
              documentStore.Initialize();
              using (IDocumentSession session = documentStore.OpenSession())
              {
                  using (var tx = new TransactionScope())
                  {
                      session.Store(document, key);
                      session.SaveChanges();
                      tx.Complete();
                  }
          }
      }
  }
  </code></pre>
  
  <p><strong>The error</strong></p>
  
  <pre><code>I'm getting the following error:
  Raven.Abstractions.Exceptions.ConcurrencyException: A document with key: 'cache-fncwr10b' is currently created in another transaction
     at Raven.Client.Connection.ServerClient.DirectBatch(IEnumerable`1 commandDatas, String operationUrl) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ServerClient.cs:line 863
     at Raven.Client.Connection.ServerClient.&lt;&gt;c__DisplayClass56.&lt;Batch&gt;b__55(String u) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ServerClient.cs:line 837
     at Raven.Client.Connection.ServerClient.TryOperation[T](Func`2 operation, String operationUrl, Boolean avoidThrowing, T&amp; result) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ServerClient.cs:line 222
     at Raven.Client.Connection.ServerClient.ExecuteWithReplication[T](String method, Func`2 operation) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ServerClient.cs:line 192
     at Raven.Client.Connection.ServerClient.Batch(IEnumerable`1 commandDatas) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ServerClient.cs:line 837
     at Raven.Client.Document.DocumentSession.SaveChanges() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\DocumentSession.cs:line 441
     at CacheWarmer.Listener.Caching.UpdateCacheEntryProcessor.PutDataIntoCache(String key, ConfgDataModel confgDataModel) in UpdateCacheEntryProcessor.cs
  </code></pre>
  
  <p><strong>The question</strong>
  Has anyone run across this?  How did you solve it? What could be causing this? </p>
  
  <p>Any helpful comments or tips will be greatly appreciated! </p>