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

mosql should support doing imports against non-replset nodes #10

Closed
TheDigitalNinja opened this Issue Feb 19, 2013 · 4 comments

Comments

Projects
None yet
4 participants
@TheDigitalNinja

TheDigitalNinja commented Feb 19, 2013

If you try to run it against a replset, it will warn, try to continue anyways, and die with

 /home/mosql/.rvm/gems/ruby-1.9.3-p385/gems/mosql-0.1.2/lib/mosql/cli.rb:192:in `initial_import': undefined method `[]' for nil:NilClass (NoMethodError) 
@nelhage

This comment has been minimized.

Show comment
Hide comment
@nelhage

nelhage Feb 19, 2013

Contributor

Hm, this should definitely have a better error message.

Is your mongo server running as part of a replica set? You need to run mosql against a replica set, as documented here: http://docs.mongodb.org/manual/replication/

Contributor

nelhage commented Feb 19, 2013

Hm, this should definitely have a better error message.

Is your mongo server running as part of a replica set? You need to run mosql against a replica set, as documented here: http://docs.mongodb.org/manual/replication/

@dpatti

This comment has been minimized.

Show comment
Hide comment
@dpatti

dpatti Feb 19, 2013

Contributor

This was a bit confusing for me at first, too, since it says is not a replset. Proceeding anyways.... I just didn't realize it was a requirement until I looked at the source and saw the ['local']['oplog.rs'] reference. That said, a single import should be possible whether or not you are using a replset, so it might be something to consider.

Contributor

dpatti commented Feb 19, 2013

This was a bit confusing for me at first, too, since it says is not a replset. Proceeding anyways.... I just didn't realize it was a requirement until I looked at the source and saw the ['local']['oplog.rs'] reference. That said, a single import should be possible whether or not you are using a replset, so it might be something to consider.

@nelhage

This comment has been minimized.

Show comment
Hide comment
@nelhage

nelhage Feb 19, 2013

Contributor

Yeah, the intent when I made that a warning was to support doing imports against a non-replSet, but I never actually implemented it. I'll update this ticket to track the fact that that should be possible.

Contributor

nelhage commented Feb 19, 2013

Yeah, the intent when I made that a warning was to support doing imports against a non-replSet, but I never actually implemented it. I'll update this ticket to track the fact that that should be possible.

@ghost ghost assigned nelhage Feb 19, 2013

@andrewjshults

This comment has been minimized.

Show comment
Hide comment
@andrewjshults

andrewjshults Feb 22, 2013

Contributor

I've added a quick patch to handle this for development work (just running a single mongo instance locally) here https://github.com/andrewjshults/mosql/tree/non-replicate-set

There's probably a cleaner way of doing this (it should probably exit after the initial import if not connected to a replica set), but this has worked so far.

Contributor

andrewjshults commented Feb 22, 2013

I've added a quick patch to handle this for development work (just running a single mongo instance locally) here https://github.com/andrewjshults/mosql/tree/non-replicate-set

There's probably a cleaner way of doing this (it should probably exit after the initial import if not connected to a replica set), but this has worked so far.

@nelhage nelhage closed this in 39722db Mar 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment