Raven Replication not transferring all documents

170 views
Skip to first unread message

Apostol Apostolov

unread,
Jan 30, 2014, 8:42:13 AM1/30/14
to rav...@googlegroups.com
Hello!

I'm running RavenDB 2.0 with replication and compression bundles on two servers. The second one was installed recently and I configured the first one to transfer all its documents to a freshly created DB in the second server.

I have about 1.3 milion documents in the first DB, however the replication to the second database stops at about 415 000.

Do you have any idea why this happens, why not all the documents transfer? There is no error in the Replication Statistics and I did try to transfer the documents  3 times. Every time the replication to second database stops at around 415 000 documents.

Any ides/suggestions would be greatly appreciated!

Thanks!
Apostol

Oren Eini (Ayende Rahien)

unread,
Jan 30, 2014, 8:57:37 AM1/30/14
to ravendb
Did you add the replication bundle at some point, or was it always there?
Did all the document originate on the master?

 RavenDB Conference

Oren Eini
CEO
Hibernating Rhinos
Office:    +972-4-674-7811
Fax:       +972-153-4622-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/groups/opt_out.

Apostol Apostolov

unread,
Jan 30, 2014, 9:07:06 AM1/30/14
to rav...@googlegroups.com
>>>Did you add the replication bundle at some point, or was it always there?

Yes.


>>>Did all the document originate on the master?

There was another server a couple of months ago that was master but it broke(hardware problem) and this one became the master. The old server and the current master were at master-master replication then and now I'm trying to setup the same again with the new serve.

Apostol Apostolov

unread,
Jan 30, 2014, 9:08:44 AM1/30/14
to rav...@googlegroups.com
>>Did you add the replication bundle at some point, or was it always there?

The replication bundle was always there. ^^

Oren Eini (Ayende Rahien)

unread,
Jan 30, 2014, 9:10:50 AM1/30/14
to ravendb
Okay, because the current master isn't the originator of all the documents, you have to setup the replication to say Changed & Replicated, not just changed.

 RavenDB Conference

Oren Eini
CEO
Hibernating Rhinos
Office:    +972-4-674-7811
Fax:       +972-153-4622-7811





Apostol Apostolov

unread,
Jan 30, 2014, 10:48:19 AM1/30/14
to rav...@googlegroups.com
Thanks!

I did that, set Transitive Replication to "Change and replicated" to a brand new Secondary DB. Sadly the result was the same number of documents as before. 415k of 1.3mil

Any other ideas?

Oren Eini (Ayende Rahien)

unread,
Jan 30, 2014, 10:58:28 AM1/30/14
to ravendb
Can you look at the logs?


 RavenDB Conference

Oren Eini
CEO
Hibernating Rhinos
Office:    +972-4-674-7811
Fax:       +972-153-4622-7811





Apostol Apostolov

unread,
Jan 30, 2014, 11:08:26 AM1/30/14
to rav...@googlegroups.com
No errors on the slave. On master there are 6 warnings for day and a half that are saying

Failed to get Version Buckets Allocated value, this error will only be reported once. 

System.UnauthorizedAccessException: Access to the registry key 'Global' is denied.
   at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
   at Microsoft.Win32.RegistryKey.InternalGetValue(String name, Object defaultValue, Boolean doNotExpand, Boolean checkSecurity)
   at Microsoft.Win32.RegistryKey.GetValue(String name)
   at System.Diagnostics.PerformanceMonitor.GetData(String item)
   at System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item)
   at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
   at System.Diagnostics.PerformanceCounterLib.CategoryExists(String machine, String category)
   at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName, String machineName)
   at Raven.Storage.Esent.TransactionalStorage.GetDatabaseTransactionVersionSizeInBytes() in c:\Builds\RavenDB-Stable\Raven.Database\Storage\Esent\TransactionalStorage.cs:line 186

Oren Eini (Ayende Rahien)

unread,
Jan 30, 2014, 11:11:28 AM1/30/14
to ravendb
Use the debug log, then try to find text such as: Will not replicate document

 RavenDB Conference

Oren Eini
CEO
Hibernating Rhinos
Office:    +972-4-674-7811
Fax:       +972-153-4622-7811





--

Apostol Apostolov

unread,
Jan 30, 2014, 12:01:36 PM1/30/14
to rav...@googlegroups.com
On Master everyting was mainly 

"No work was found"

On Slave I found that logs like these a couple of times:


Oren Eini (Ayende Rahien)

unread,
Jan 30, 2014, 12:07:43 PM1/30/14
to ravendb
Try replicating to a new database, not the existing one.
And you'll want the logs in a text file, the logs in the UI are only the latest 500 ones.

 RavenDB Conference

Oren Eini
CEO
Hibernating Rhinos
Office:    +972-4-674-7811
Fax:       +972-153-4622-7811





--

Apostol Apostolov

unread,
Jan 31, 2014, 11:19:25 AM1/31/14
to rav...@googlegroups.com
Ok I think the problem was "Change and replicated" setting. Now everything's fine. 

Thank you, Oren!
Reply all
Reply to author
Forward
0 new messages