Force re-replication of documents

405 views
Skip to first unread message

Trent Johnson

unread,
Feb 2, 2013, 9:59:55 AM2/2/13
to rav...@googlegroups.com
Hi,

I am having trouble getting document to replicate back to a simulated failed server.  Documents created on the failed server don't replicate back even after total deletion of all databases and settings.

I did the following procedure:

Server A:
 Import a bunch of documents with smuggler
 Add Raven/Replication/Destinations with ServerB as destination
 Wait for all documents to replicate to ServerB
 Shutdown raven service
Server B:
 Create some more documents
 Delete the Raven/Replication/Destinations document
Server A:
 Install version 2.0 (build 2246) starting with empty databases
 Create a tenant database, and add Raven/Authorization/WindowsSettings
Server B:
 Create the Raven/Replication/Destinations with ServerA listed as the destination.

The newly created documents on ServerB replicate just fine, but I expect the documents imported on ServerA with smuggler will now replicate back to ServerA, however they do not.  How can I get them onto ServerA?

Oren Eini (Ayende Rahien)

unread,
Feb 2, 2013, 10:03:37 AM2/2/13
to ravendb
By default, we only replicate documents that were added on the current server.
Change this:
Inline image 1




--
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.
 
 

image.png

Trent Johnson

unread,
Feb 2, 2013, 10:34:15 AM2/2/13
to rav...@googlegroups.com
The source server is on build960.  Any way to get to that setting there?

Oren Eini (Ayende Rahien)

unread,
Feb 2, 2013, 10:36:33 AM2/2/13
to ravendb
Same way, pretty much:
Inline image 1
image.png

Trent Johnson

unread,
Feb 2, 2013, 10:41:47 AM2/2/13
to rav...@googlegroups.com
Also, when I do set that on build 2246, it doesn't stay set.  In the replication document it says:
 "TransitiveReplicationBehavior": "None",
After saving.

Oren Eini (Ayende Rahien)

unread,
Feb 2, 2013, 10:47:11 AM2/2/13
to ravendb
I know, we have an issue for that

Trent Johnson

unread,
Feb 2, 2013, 11:02:46 AM2/2/13
to rav...@googlegroups.com
Thanks - That worked very well.

Trent Johnson

unread,
Feb 2, 2013, 11:11:28 AM2/2/13
to rav...@googlegroups.com
Hi Oren,

Actually, it did replicate most of the documents, 19,831 of 20,773.  What happened to the rest?

Thanks,
Trent

Oren Eini (Ayende Rahien)

unread,
Feb 2, 2013, 11:13:04 AM2/2/13
to ravendb
Not sure, anything special about them?

Trent Johnson

unread,
Feb 2, 2013, 11:17:20 AM2/2/13
to rav...@googlegroups.com
Not that I know of... How would I tell?

Oren Eini (Ayende Rahien)

unread,
Feb 2, 2013, 11:23:06 AM2/2/13
to ravendb
Try to see a document that wasn't replicated, when you do that, look at the metadata, do you see something there?

Trent Johnson

unread,
Feb 3, 2013, 10:47:08 AM2/3/13
to rav...@googlegroups.com
Below is metadata from one of the documents.  I did an egrep -v "(Last-Modified|@etag|Non-Authoritative-Information)" on the Smuggler.out from both servers and ran through diff. Interestingly all the documents that do not replicate are past a certain point in the file.  Eg. all documents at the top of Smuggler.out replicate fine, but after a certain point in the file (line 1118039), those documents do not replicate back.

      "@metadata": {
        "Raven-Entity-Name": "StudentNotebooks",
        "Raven-Clr-Type": "MakingMath.Notebooks.StudentNotebook, MakingMath",
        "Raven-Replication-Version": 16324,
        "Raven-Replication-Source": "c1c84d83-839f-4b70-ada4-5441e49d987d",
        "__document_id": "StudentNotebooks/UIUC_NetMath_Math415_R2012_MM_Redacted_MGM013TryIt1",
        "Content-Type": "application/json; charset=utf-8",
        "Raven-Replication-History": [
          {
            "Raven-Replication-Version": 3262,
            "Raven-Replication-Source": "de3c709f-8807-4c61-9854-0130380d0970"
          }
        ],
        "@id": "StudentNotebooks/UIUC_NetMath_Math415_R2012_MM_Redacted_MGM013TryIt1",
        "Last-Modified": "2013-02-02T16:05:28.6268002Z",
        "@etag": "00000001-0000-0100-0000-000000003f49",
        "Non-Authoritative-Information": false

Oren Eini (Ayende Rahien)

unread,
Feb 3, 2013, 4:21:57 PM2/3/13
to ravendb
This is probably the key, see:
        "Raven-Replication-Source": "c1c84d83-839f-4b70-ada4-5441e49d987d",


What is the db id for the remote db? If this is the same id, they won't replicate.

Trent Johnson

unread,
Feb 4, 2013, 8:12:48 AM2/4/13
to rav...@googlegroups.com
Hi Oren - thanks for all your help.

I discovered that the counts were different because the deleted / tombstone documents were in one server but not the other.  It might be helpful to show those counts separately in studio to make it more obvious.

How are other people monitoring circular replication systems to verify that everything is in sync?

Thanks,
Trent

Oren Eini (Ayende Rahien)

unread,
Feb 4, 2013, 9:31:50 AM2/4/13
to ravendb
In 1.0 we had those issues, but in 2.0, the tombstones are maintained separatedly.

Trent Johnson

unread,
Feb 4, 2013, 10:59:42 AM2/4/13
to rav...@googlegroups.com
Out of curiosity, how are they maintained now?

Oren Eini (Ayende Rahien)

unread,
Feb 4, 2013, 11:01:00 AM2/4/13
to rav...@googlegroups.com
Separate data structure that is internal to the sb
--
Reply all
Reply to author
Forward
0 new messages