Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Conversation

@elyse-mdb
Copy link
Collaborator

@elyse-mdb elyse-mdb commented Dec 12, 2024

DESCRIPTION

currently, we don't document how to verify that shard keys are migrated during a sync. that said, it is important that users do this, so it'd be great to add this note.

From Felipe Gasper:

To find a collection’s shard key, look in config.collections for a document whose _id is the namespace in question, then look at that document’s key. So to manually check shard keys, run such a query on both source & destination, and compare the results.

STAGING

https://deploy-preview-526--docs-cluster-to-cluster-sync.netlify.app/reference/verification/

JIRA

DOCSP-45308

SELF-REVIEW CHECKLIST

  • Does each file have 3-5 taxonomy facet tags?
    See the taxonomy tagging instructions and this example PR
  • Is this free of any warnings or errors in the RST?
  • Is this free of spelling errors?
  • Is this free of grammatical errors?
  • Is this free of staging / rendering issues?
  • Are all the links working?

EXTERNAL REVIEW REQUIREMENTS

What's expected of an external reviewer?

@netlify
Copy link

netlify bot commented Dec 12, 2024

Deploy Preview for docs-cluster-to-cluster-sync ready!

Name Link
🔨 Latest commit ab32f10
🔍 Latest deploy log https://app.netlify.com/sites/docs-cluster-to-cluster-sync/deploys/67606e6616c4570008e01f4b
😎 Deploy Preview https://deploy-preview-526--docs-cluster-to-cluster-sync.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@mdb-ashley mdb-ashley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just left a couple comments for your consideration. Thanks, Elyse!

Shard Key Comparison
- To verify the transfer of shard keys to a synced collection, run a query on the ``config.collections``
collection to find a document whose ``_id`` value is the namespace of the target collection.
Compare the ``key`` value of this document in the source and destination clusters.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[question] Should key be monospaced here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am using "key" to refer to the field name in the document, so if _id is monospaced, it feels more consistent to also monospace key. Do you think it would be helpful to emphasize thatkey is a field name? eg

"Compare the key field value..."

Co-authored-by: Ashley Brown <98361885+mdb-ashley@users.noreply.github.com>
Co-authored-by: Felipe Gasper <FGasper@users.noreply.github.com>
@elyse-mdb elyse-mdb merged commit 0ba82ee into mongodb:master Dec 16, 2024
4 checks passed
@elyse-mdb elyse-mdb deleted the DOCSP-45308-verifyShardKeys branch December 16, 2024 18:21
elyse-mdb added a commit to elyse-mdb/docs-cluster-to-cluster-sync that referenced this pull request Dec 16, 2024
* (DOCSP-45308) Edits.

* (DOCSP-45308) Verify shard key.

* (DOCSP-45308) Edits.

* (DOCSP-45308) Condense code example.

* (DOCSP-45308) edits.

* (DOCSP-45308) Edits.

* Update source/reference/verification.txt

Co-authored-by: Ashley Brown <98361885+mdb-ashley@users.noreply.github.com>

* Update source/reference/verification.txt

Co-authored-by: Felipe Gasper <FGasper@users.noreply.github.com>

---------

Co-authored-by: Ashley Brown <98361885+mdb-ashley@users.noreply.github.com>
Co-authored-by: Felipe Gasper <FGasper@users.noreply.github.com>
mdb-ashley added a commit that referenced this pull request Dec 17, 2024
* (DOCSP-45308) Edits.

* (DOCSP-45308) Verify shard key.

* (DOCSP-45308) Edits.

* (DOCSP-45308) Condense code example.

* (DOCSP-45308) edits.

* (DOCSP-45308) Edits.

* Update source/reference/verification.txt



* Update source/reference/verification.txt



---------

Co-authored-by: Ashley Brown <98361885+mdb-ashley@users.noreply.github.com>
Co-authored-by: Felipe Gasper <FGasper@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants