SqlReplication Reset not consistently working

38 views
Skip to first unread message

Preston

unread,
Sep 27, 2016, 4:57:59 PM9/27/16
to RavenDB - 2nd generation document database
We have noticed that the 'Reset' command works inconsistently for SQL replication. if we reset a replication configuration it may or may not work. It always removed the item from the collection in /docs/Raven/SqlReplication/Status, but it will sometimes come back immediately showing as being fully replicated.

We have noticed that it often happens that if we do more than one, the first one is more likely to succeed, but subsequent resets will almost always fail. I haven't had a chance to dig into the code on this, but my theory is that the thread running the replication is not checking for concurrency on the tracking document and is overwriting it when the batch is complete. so the busier replication is, the more likely it is to ignore a reset command.

The only workaround we have found is to delete the replication instance, wait at long enough for a replication batch or two to finish, and re-add the replication instance.

Also note, a 'nice to have' feature would be a way to reset multiple replication instances at once so they process as a batch.


Tal Weiss

unread,
Sep 27, 2016, 5:25:45 PM9/27/16
to RavenDB - 2nd generation document database
you're correct.
when a batch of Sql Replication ends it will apply the last replicated etag it replicated as long as it is greater than the original last replicated etag.
We need to add a check for the sql replication status to check that its etag was not changed indicating that a reset may have occurred.
Thanks for reporting this, it will get fix.

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Tal Weiss l Core Team Developer Mobile:+972-54-802-4849

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811l Skype: talweiss1982

RavenDB paving the way to "Data Made Simplehttp://ravendb.net/ 

Tal Weiss

unread,
Sep 28, 2016, 7:16:56 AM9/28/16
to RavenDB - 2nd generation document database
Reply all
Reply to author
Forward
0 new messages