Skip to content

Text special symbol "\" in data is turned into "\\" in mongo migration #1643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AndrewKeplinger opened this issue Apr 26, 2016 · 1 comment
Closed

Comments

@AndrewKeplinger
Copy link

AndrewKeplinger commented Apr 26, 2016

Working on step one of migration from Parse to mLab server. This is just the first step. Stepped through the migration process. Our data contains text symbols in the descriptions which render out special symbols beginning with a \ character. When the data is migrated to a mongo db on mLabs additional \ are added and apparent when viewing the resulting migration.

Only the data has been migrated to mongo, so parse.com is still being used as a conduit. No other changes have been made, and the duplicated \ (double slashes not rendering in this system) is immediately apparent in the cloned data.

Directly calling Parse php calls to update the data in the mongo tables also introduces the same double \ in the data.

Environment Setup

Followed tutorial for migration of database from Parse to mLab up to the point where we finalized the connection, using a duplicate of our main project.

Steps to reproduce

You should be able to see this problem by including something like this in a string field migrated from Parse.

> somedata\u0026reg; moredata\u0026reg;

The destination data will appear:

> somedata\\u0026reg; moredata\\u0026reg;

Logs/Trace

No errors or crashes reported or pertinent log statements to note here.

My guess is that some function for adding backslashes to data is getting called more than once. Our workaround on the client side would be to replace all \\with \, but maintaining data integrity is preferable.

Is it possible that this is a mLab mongo setting on import that can be turned off?

@drew-gross
Copy link
Contributor

drew-gross commented Apr 26, 2016

For issues with the migration process, please use http://parse.com/help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants