[DOCS-15709] [C2C] Investigate Support Collection-level Filtering Created: 27/Oct/22  Updated: 30/Oct/23  Resolved: 13/Jan/23

Status: Closed
Project: Documentation
Component/s: C2C, manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Dave Cuthbert (Inactive)
Resolution: Fixed Votes: 0
Labels: .local, nyc.local23
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
Problem/Incident
Participants:
Days since reply: 1 year, 11 weeks ago
Epic Link: DOCSP-26837

 Description   
Original Downstream Change Summary

Support collection-level filtered replication for the migration use case. Refer to the behavioral changes section in WRITING-9296.

Description of Linked Ticket

Epic Summary

Summary

Support collection-level filtered replication for the migration use case

Motivation

Cast of Characters

  • Product Owner:
  • Project Lead:
  • Program Manager:

Documentation

Product Description
Scope Document
Technical Design Document



 Comments   
Comment by Rohan Sharan [ 23/Nov/22 ]

Hi dave.cuthbert@mongodb.com, as mentioned during the demo, REP-41 is complete. We are targeting a release of December (between early and mid), and would love to get the documentation started. I'm OOO next week, but the design should contain relevant information for filtered sync.

To run filtered sync, download a binary from the compile task of whatever platform you're running mongosync on from here: https://evergreen.mongodb.com/version/mongosync_5d0cb9b548156f221354e16ca60abbe6a199ede9.

After mongosync is running, you can ping the /start endpoint marking specific namespaces for syncing:

curl -X POST "http://localhost:27182/api/v1/start" --data '{"source": "cluster0", "destination": "cluster1", "includeNamespaces" : [
  {
    "database" : "test", "collections": ["coll"]
  },
  {
    "database" : "test2"
  }
]
}

Then you can try adding documents in the source cluster, and making sure that the documents matching the filter show up in the destination. A sample list of commands is here:

use test
db.coll.insertOne({"test": 2})
db.othercoll.insertOne({"test": 100})
use test2
db.randomcoll.insertOne({"random": 10})
db.coll.insertOne({"test": 2})
use test3
db.coll.insertOne({"test": 2})

Generated at Thu Feb 08 08:13:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.