Strange replication issue

69 views
Skip to first unread message

Per-Frode Pedersen

unread,
Mar 13, 2015, 6:26:59 AM3/13/15
to rav...@googlegroups.com
We have a replication issue where we get conflicts on a slave when we update a document on the master server. 

The way I read the metadata, It seems to me that both changes have happened on the master server, and it still creates a conflict on the slave.

The documents look like this:

test/1/conflicts/0734a183-30aa-5227-811f-2dc3d560a2cb metadata:
{
  "Raven-Replication-Source": "http://server-01:8080/databases/DB",
  "Raven-Replication-Conflict": "true"
}

test/1/conflicts/4431b414-b320-6f81-f3bb-3d980744c1e3 metadata:
{
  "Raven-Entity-Name": "Test",
  "Raven-Clr-Type": "TestProject.Test, TestProject",
  "Raven-Expiration-Date": "2015-03-21T09:15:00",
  "Raven-Replication-History": [],
  "Raven-Replication-Version": "4922603",
  "Raven-Replication-Source": "098d74cf-cc70-4bba-bd54-76a4615d14f6",
  "Raven-Replication-Conflict-Document": "true",
  "Raven-Replication-Conflict": "true"
}

Raven/Replication/Sources/http://server-01:8080/databases/DB
{
  "LastDocumentEtag": "01000000-0000-0009-0000-0000000113B9",
  "LastAttachmentEtag": "00000000-0000-0000-0000-000000000000",
  "ServerInstanceId": "098d74cf-cc70-4bba-bd54-76a4615d14f6",
}

Version 1 have replication source http://server-01:8080/databases/DB
Version 2 have replication source 098d74cf-cc70-4bba-bd54-76a4615d14f6
but the way I read the replication sources document, those are the same server.

Also, if there were local changes to any of these document, there should have been a Replication History entry with  different replication sorce, 

Am I reading this correctly, or is there another issue here?


Oren Eini (Ayende Rahien)

unread,
Mar 15, 2015, 2:49:11 AM3/15/15
to ravendb
Can you show the full metadata for both conflicted documents?

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

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

 


--
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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Per-Frode Pedersen

unread,
Mar 17, 2015, 8:03:08 AM3/17/15
to rav...@googlegroups.com
The metadata on these documents was almost complete, I had left out Raven-Entity-Name and Raven-Clr-Type on version 1, as I didn't believe it to be important: 

The complete metadata is:
test/1/conflicts/0734a183-30aa-5227-811f-2dc3d560a2cb metadata:
{
  "Raven-Entity-Name": "Test",
  "Raven-Clr-Type": "TestProject.Test, TestProject",
  "Raven-Replication-Source": "http://server-01:8080/databases/DB",
  "Raven-Replication-Conflict": "true"
}

test/1/conflicts/4431b414-b320-6f81-f3bb-3d980744c1e3 metadata:
{
  "Raven-Entity-Name": "Test",
  "Raven-Clr-Type": "TestProject.Test, TestProject",
  "Raven-Expiration-Date": "2015-03-21T09:15:00",
  "Raven-Replication-History": [],
  "Raven-Replication-Version": "4922603",
  "Raven-Replication-Source": "098d74cf-cc70-4bba-bd54-76a4615d14f6",
  "Raven-Replication-Conflict-Document": "true",
  "Raven-Replication-Conflict": "true"
}

Raven/Replication/Sources/http://server-01:8080/databases/DB
{
  "LastDocumentEtag": "01000000-0000-0009-0000-0000000113B9",
  "LastAttachmentEtag": "00000000-0000-0000-0000-000000000000",
  "ServerInstanceId": "098d74cf-cc70-4bba-bd54-76a4615d14f6",
}

Oren Eini (Ayende Rahien)

unread,
Mar 18, 2015, 4:39:49 PM3/18/15
to ravendb
Where is the   "Raven-Replication-History": values?
It should be on both of them.

  "Raven-Replication-Source": "http://server-01:8080/databases/DB",

And this shouldn't happen.

Per-Frode Pedersen

unread,
Mar 20, 2015, 9:44:33 AM3/20/15
to rav...@googlegroups.com
I don't know.It looked like that after the conflict occurred. We never write to that server, So the document must be replicated there... 


These conflicts appeared occured after a replication failure, where the setting Raven/ActiveBundles entry disappeared from the database document. That could be the cause of the problem.

This has happened a 4-5 times the last year, after the last time we added a job to check the settings and restore it if the bundles were missing...

Oren Eini (Ayende Rahien)

unread,
Mar 20, 2015, 6:28:35 PM3/20/15
to ravendb
Huh?! That is NOT supported.

What build are you using?

Per-Frode Pedersen

unread,
Mar 25, 2015, 4:33:33 PM3/25/15
to rav...@googlegroups.com
Supported or not, the bundle settings are disappearing from the database document. And since it happens, we need to handle it somehow until we figure out what causes it.

I'm absolutely certain that we don't have any code anywhere that updates the database document. My theory is that it's caused by a server problem that causes the document to be recreated.


We're using build 2750.

Michael Yarichuk

unread,
Mar 26, 2015, 2:31:04 AM3/26/15
to rav...@googlegroups.com
Bundle settings disappearing from database document? I cannot think of anything that can do this.

Is this reproducible?

--
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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best regards,

 

Michael Yarichuk

RavenDB Core Team

Tel: 972-4-6227811

Fax:972-153-4-6227811

Email : michael....@hibernatingrhinos.com

 

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

Oren Eini (Ayende Rahien)

unread,
Mar 26, 2015, 6:24:49 AM3/26/15
to ravendb
Please upgrade to the latest 2.5 build. It contains protections from users modifying the database documents.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

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

 


Reply all
Reply to author
Forward
0 new messages