[SERVER-5211] Refactor CmdLine::store Created: 05/Mar/12 Updated: 11/Jul/16 Resolved: 10/Oct/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Andy Schwerin |
| Resolution: | Done | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
We should split it into two steps. store() should only store the options, but not act on them. A new function process() should act on them. Currently it is hard to get a holistic view of all options because things like --fork and --logpath modify the running state before we can intercept. This is particularly a problem for --shutdown, but there are other cases where it would be nice to have a step between reading the config and acting on it. |
| Comments |
| Comment by auto [ 10/Oct/12 ] |
|
Author: {u'date': u'2012-10-08T11:18:02-07:00', u'email': u'schwerin@10gen.com', u'name': u'Andy Schwerin'}Message: The new functions are CmdLine::store, with the same signature as before, and This separation makes it easier to test functions in the command line parsing |
| Comment by auto [ 10/Oct/12 ] |
|
Author: {u'date': u'2012-10-08T14:47:37-07:00', u'email': u'schwerin@10gen.com', u'name': u'Andy Schwerin'}Message: . |
| Comment by auto [ 10/Oct/12 ] |
|
Author: {u'date': u'2012-10-04T15:59:22-07:00', u'email': u'schwerin@10gen.com', u'name': u'Andy Schwerin'}Message: |
| Comment by Tad Marshall [ 05/Mar/12 ] |
|
It is both convenient and a problem that CmdLine::store does so much. A connected issue (like --shutdown) is the set of Windows service-related command line options that should never appear in a config file. We need a way of flagging options by source. |