Question

EDIT 2: I'm encountering precisely the same issue.

For RavenDB Replication, the Raven-Replication-Source Guid is very handy when trying to discern which documents came from which server.

But in a disaster recovery scenario, it may be necessary to ensure that an instance's Raven-Replication-Source Guid remains the same as it was before it failed.

My Question:

  • Can I set a database's Raven-Replication-Source Guid manually?

EDIT (in response to Ayende's comment):

And here is the scenario:

  • The client uses one master RavenDB instance for all of its reads and writes.
  • This master instance replicates to a hot spare instance.
  • When the master instance fails, the client immediately fails over to the hot spare by virtue of this configuration setting.
  • Upon closer inspection, we discover that the master RavenDB instance has been corrupted and needs to be purged.
  • When we recreate the master RavenDB instance, replication from the hot spare will only replicate documents that were created on the hot spare.
    • Emphasis: The hot spare will not replicate documents that were created on the master (prior to the disaster) back to the master because their Raven-Replication-Source Guid is the master's Raven-Replication-Source Guid.
  • And this is a problem because, as I said, the master RavenDB instance was purged, we needed to recreate the database from scratch, and we need to replicate all of the documents from the hot spare back to the master instance.

EDIT 3: @Ayende's answer's pushed me to discover that I was solving the wrong problem. Here is the right way to solve my problem.

Was it helpful?

Solution

No, that is not something that you control. And I am not sure what scenario you have that requires this. The Raven-Replication-Source is the db id of the last db where this changed (without replication).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top