# Let the PCSM initial clone read from a secondary or hidden member

**URL:** <https://forums.percona.com/t/let-the-pcsm-initial-clone-read-from-a-secondary-or-hidden-member/41445>\
**Category:** Percona ClusterSync for MongoDB (PCSM)\
**Tags:** percona, mongodb\
**Created:** [November 17, 2026, 4:17am UTC](https://forums.percona.com/t/let-the-pcsm-initial-clone-read-from-a-secondary-or-hidden-member/41445 "2026-11-17T04:17:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_Kadam1](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/abhishek_kadam1/32/24535_2.png) [@Abhishek\_Kadam1](https://forums.percona.com/u/Abhishek_Kadam1)\
**Post date:** [November 17, 2026, 4:17am UTC](https://forums.percona.com/t/let-the-pcsm-initial-clone-read-from-a-secondary-or-hidden-member/41445/1 "2026-11-17T04:17:30Z")

</div>

Hi all,

We use PCSM to move a large collection (several TB) from one replica set to another. The tool works well, but we’ve hit a limitation that keeps the migration from completing safely.

**The problem**

The initial clone always reads from the source **primary**. With a multi-TB collection, the clone runs for days and pushes a lot of cold data through the primary’s WiredTiger cache. On a busy, memory-bound primary we saw:

- cache usage staying above the eviction target for the whole clone,
- and, at normal daily traffic peaks, application threads pulled into eviction, which showed up as stalled writes and timeouts for the applications using that cluster.

Fewer read workers helped, but didn’t fix it. A clone of several days still crosses several traffic peaks, it can’t be paused, and an aborted clone starts from zero. So for us, migrating a large collection off a busy primary isn’t possible today without risking production impact.

**What would help**

An optional, separate connection string used **only for clone reads** , for example `--source-clone-uri` / `PCSM_SOURCE_CLONE_URI`. It would accept `directConnection=true` or a `readPreference`, so the clone can read from a secondary or a hidden member, such as a dedicated backup node that serves no application traffic.

Everything that needs the primary or is cheap there would stay as it is: the `appendOplogNote` start anchor, the change stream, and metadata reads.

**One correctness detail**

The clone start point is taken on the primary. A slightly lagging secondary may not have applied the last writes before that point yet. To avoid missing them, clone reads on the secondary would need a causally consistent session with `readConcern: majority` and `afterClusterTime` set to the start timestamp. Delayed members should be rejected.

**Related**

A rate limit, or pause/resume during the clone phase, would also help with the same problem.

Is this something you’d consider? We’d be glad to discuss the design, and we’re open to contributing a PR if the approach makes sense to you.

Thanks!

---

<div class="post-metadata">

**Author:** ![Deepak\_Rai](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/deepak_rai/32/24425_2.png) [@Deepak\_Rai](https://forums.percona.com/u/Deepak_Rai)\
**Post date:** [November 17, 2026, 8:26am UTC](https://forums.percona.com/t/let-the-pcsm-initial-clone-read-from-a-secondary-or-hidden-member/41445/2 "2026-11-17T08:26:12Z")

</div>

Hi @Abhishek_Kadam1,

Thanks for sharing this use case. You are right, PCSM’s initial clone always reads from the primary. A `readPreference` or `directConnection` in the source URI is ignored, so reading from a secondary or hidden member isn’t possible today (see [Limitations](https://docs.percona.com/percona-clustersync-for-mongodb/limitations.html)). The clone phase also can’t be paused or resumed: `pause`/`resume` only apply once real-time replication has started. For now, lowering `--clone-num-read-workers` is the main way to reduce read load on the source, though as you saw, it reduces the impact rather than removing it.

The approach sounds reasonable, including the `afterClusterTime` guard. One suggestion, use a hidden member with `votes: 0` for the clone reads. If a voting secondary that the majority depends on falls behind, it can trigger flow control on the primary and bring back the impact you’re trying to avoid.

I have opened a feature request for this so the team can track it: [https://perconadev.atlassian.net/browse/PCSM-420](https://perconadev.atlassian.net/browse/PCSM-420). Feel free to watch it or add details there.

PRs are welcome too: [percona-clustersync-mongodb/CONTRIBUTING.md at main · percona/percona-clustersync-mongodb · GitHub](https://github.com/percona/percona-clustersync-mongodb/blob/main/CONTRIBUTING.md)
