[SERVER-10319] [mongostat] --discover option does not respect --rowcount (-n) output limitation Created: 24/Jul/13 Updated: 22/Aug/14 Resolved: 10/Oct/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Tools |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Sam Kleinman (Inactive) | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
If you run mongostat with the --discover option, mongostat will not respect the --rowcount (or -n) option, and continue to output until ^C'd. mongostat should either respect --rowcount when running with --discover, otherwise it should produce an incompatible argument error (which should also be documented.) |
| Comments |
| Comment by auto [ 10/Oct/13 ] | ||||||||||||||||||||||||||
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: | ||||||||||||||||||||||||||
| Comment by Eric Daniels (Inactive) [ 25/Jul/13 ] | ||||||||||||||||||||||||||
|
I think that is probably a better solution. Where would we draw the line though with --discover since it could be finding more on each iteration? In that case maybe it is better to say incompatible arguments for --discover but keep it working for multiple hosts? | ||||||||||||||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 25/Jul/13 ] | ||||||||||||||||||||||||||
|
It's not the difficulty of the change, it's whether the behavior is desirable. It often takes a couple iterations for the mongostat program to get useful data from a cluster, so would --rowcount indicate the first n rows which have complete data? Hold off on merging this just yet. | ||||||||||||||||||||||||||
| Comment by Eric Daniels (Inactive) [ 25/Jul/13 ] | ||||||||||||||||||||||||||
|
Pull Request: | ||||||||||||||||||||||||||
| Comment by Eric Daniels (Inactive) [ 25/Jul/13 ] | ||||||||||||||||||||||||||
|
I don't think that would be necessary. runMany() is just called instead of runNormal() which tracks rows printed but never limits it to rowcount/n. These are the only changes needed.
| ||||||||||||||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 24/Jul/13 ] | ||||||||||||||||||||||||||
|
I think the correct behavior here is to error out with a message and to document. |