Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8230909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:17:38+00:00 2026-06-07T17:17:38+00:00

I have created a data migration tool that reads data from a legacy SQL

  • 0

I have created a data migration tool that reads data from a legacy SQL database, transforms it into something a lot more sensible and then stores it in RavenDB.

When I try to write 22500 1KB objects in a single Raven session, I get the following error:

System.InvalidOperationException: Could not replicate POST operation to secondary node, failover behavior is: AllowReadsFromSecondaries

The message suggests Master Raven instance encountered a fatal error and migration tool failed over to Slave Slave Raven instance and tried to write to it. What I don’t know is why.

Background information:

  • .NET 4.0
  • RavenDB #2025-Unstable (can’t use stable build because of dependency on Json.NET)
  • Using RavenDB Replication bundle (replication is configured correctly)
  • Write operations are wrapped in a TransactionScope (there are writes happening elsewhere in the migration tool using a separate Raven session)
  • No errors in Windows Event Log

Log on Master Raven instance contains the following error:

System.Threading.ThreadAbortException: Thread was being aborted.
   at Microsoft.Isam.Esent.Interop.Implementation.NativeMethods.JetSeek(IntPtr sesid, IntPtr tableid, UInt32 grbit)
   at Microsoft.Isam.Esent.Interop.Implementation.JetApi.JetSeek(JET_SESID sesid, JET_TABLEID tableid, SeekGrbit grbit) in C:\Work\ravendb\SharedLibs\Sources\managedesent-61618\EsentInterop\JetApi.cs:line 3172
   at Microsoft.Isam.Esent.Interop.Api.TrySeek(JET_SESID sesid, JET_TABLEID tableid, SeekGrbit grbit) in C:\Work\ravendb\SharedLibs\Sources\managedesent-61618\EsentInterop\MoveHelpers.cs:line 127
   at Raven.Storage.Esent.StorageActions.DocumentStorageActions.EnsureDocumentIsNotCreatedInAnotherTransaction(String key, Guid txId) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Storage.Esent\StorageActions\Util.cs:line 77
   at Raven.Storage.Esent.StorageActions.DocumentStorageActions.AddDocument(String key, Nullable`1 etag, RavenJObject data, RavenJObject metadata) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Storage.Esent\StorageActions\Documents.cs:line 296
   at Raven.Database.DocumentDatabase.<>c__DisplayClass37.<Put>b__30(IStorageActionsAccessor actions) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Database\DocumentDatabase.cs:line 480
   at Raven.Storage.Esent.TransactionalStorage.Batch(Action`1 action) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Storage.Esent\TransactionalStorage.cs:line 328
   at Raven.Database.DocumentDatabase.Put(String key, Nullable`1 etag, RavenJObject document, RavenJObject metadata, TransactionInformation transactionInformation) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Database\DocumentDatabase.cs:line 468
   at Raven.Database.DocumentDatabase.<>c__DisplayClass67.<Commit>b__64(DocumentInTransactionData doc) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Database\DocumentDatabase.cs:line 654
   at Raven.Storage.Esent.StorageActions.DocumentStorageActions.CompleteTransaction(Guid txId, Action`1 perDocumentModified) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Storage.Esent\StorageActions\General.cs:line 272
   at Raven.Database.DocumentDatabase.<>c__DisplayClass67.<Commit>b__63(IStorageActionsAccessor actions) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Database\DocumentDatabase.cs:line 658
   at Raven.Storage.Esent.TransactionalStorage.ExecuteBatch(Action`1 action) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Storage.Esent\TransactionalStorage.cs:line 374
   at Raven.Storage.Esent.TransactionalStorage.Batch(Action`1 action) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Storage.Esent\TransactionalStorage.cs:line 334
   at Raven.Database.DocumentDatabase.Commit(Guid txId) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Database\DocumentDatabase.cs:line 668
   at Raven.Database.Server.Responders.TransactionCommit.Respond(IHttpContext context) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Database\Server\Responders\TransactionCommit.cs:line 28
   at Raven.Database.Server.HttpServer.DispatchRequest(IHttpContext ctx) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Database\Server\HttpServer.cs:line 582
   at Raven.Database.Server.HttpServer.HandleActualRequest(IHttpContext ctx) in c:\Builds\RavenDB-Unstable-v1.2\Raven.Database\Server\HttpServer.cs:line 347

Is there an upper limit on number of writes per session when using transactions with replication?
Could this, perhaps, be a result of using an unstable build?

EDIT: Cross-posted on RavenDB Google Groups: https://groups.google.com/forum/?fromgroups#!starred/ravendb/FZZ_Q1y59qI

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:17:40+00:00Added an answer on June 7, 2026 at 5:17 pm

    Looks like this might be a bug. Provided a repro, so hopefully someone from the dev team will look into it.

    See RavenDB Google Groups thread https://groups.google.com/forum/?fromgroups#!starred/ravendb/FZZ_Q1y59qI for more information.

    Will update this answer as more information becomes available.

    Update: Writing this many objects within a single DTC session is not supported: https://groups.google.com/d/msg/ravendb/FZZ_Q1y59qI/fimWkX8NZm0J

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an entity data model and generated a database from it. One
I have a test server that uses data from a test database. When I'm
I have created data sources from my objects in my project, some of which
I have created a Data Access Layer using .NET. Everywhere that I update a
I have created a data base that comes in an installer that runs as
i have created an application which show data from user current location. I want
I've recently been toying with data migration into Microsoft Dynamics CRM using MS SQL
I am in the process of doing a data migration from OpenCart into Drupal
Hi I have a sqlite3 database full of data from my previous version of
My company performed a data migration recently (in a SQL Server 2005 database) and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.