[SERVER-15854] Improve logs when calling removeShard on a removed shard Created: 29/Oct/14 Updated: 18/Sep/15 Resolved: 13/Mar/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.6.4 |
| Fix Version/s: | 3.1.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Victor Hooi | Assignee: | Daniel Alabi |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Participants: | |||||
| Description |
|
The procedure for removing a shard from a sharded cluster is to run the removeShard command twice. The first invocation will start draining the shard. Once that is complete, a second invocation will then remove the shard. However, there is not progress given for when the drain is complete. This makes it quite possibly you may have to run the removeShard command several times, in order to see whether it starts the remove or not. Also, if you happen to run the removeShard command once the removal is complete, it prints a assertion message:
as well as a stack trace:
Please could we handle this condition more gracefully? (Either by making the assertion message a bit friendlier and/or not dumping out the stack trace like that). |
| Comments |
| Comment by Githook User [ 13/Mar/15 ] |
|
Author: {u'username': u'alabid', u'name': u'Daniel Alabi', u'email': u'alabidan@gmail.com'}Message: |
| Comment by Githook User [ 11/Mar/15 ] |
|
Author: {u'username': u'alabid', u'name': u'Daniel Alabi', u'email': u'alabidan@gmail.com'}Message: |
| Comment by Andy Schwerin [ 10/Mar/15 ] |
|
alabid, please remove the stack trace. You might be able to replace the use of Shard::make with Shard::findIfExists. If the shard doesn't exist, you can log a more informative message and also return the more informative message in the command message. Talk to renctan about whether that approach is sound. |