Replication telemetry when there is nothing to sync

  • Does the replication:medic:to:success telemetry key get written even when there is nothing new to replicate up?
  • Does replication:medic:from:success get written even when there is nothing new to replicate down?
  • Are replication operations done serially or in parallel?
  • If serial, does to always get attempted before from (or vice versa)?

I can imagine that the client doesn’t bother trying to replicate to if it knows there is nothing to send, but the client won’t know if there is nothing to replicate from until it is actually attempted, though perhaps there’s some sort of “is replication necessary” check that happens independently from / before actually replicating.

  • Does the replication:medic:to:success telemetry key get written even when there is nothing new to replicate up?

Yes.

  • Does replication:medic:from:success get written even when there is nothing new to replicate down?

Yes.

We even have an additional replication metric replication:<database>:<direction>:docs which records the number of docs that were replicated.

Thanks @diana !

What do you think about the other two questions?

  • Are replication operations done serially or in parallel?
  • If serial, does to always get attempted before from (or vice versa)?
  • Are replication operations done serially or in parallel?
  • If serial, does to always get attempted before from (or vice versa)?

Depends on the CHT version. CHT 4.3 and after will replicate TO, and then replicate FROM.
CHT 4.2 and before will replicate in parallel.

1 Like