iilyak opened a new pull request #3933:
URL: https://github.com/apache/couchdb/pull/3933
## Overview
Recent refactor of `couch_index_server` made it a sharded implementation.
This means multiple processes are in play now. This made it somewhat harder to
bounce in production in case of problems. Also the
`couch_debug:print_linked_processes(couch_index_server)` had an assumption that
`couch_index_server` is a single process.
This PR does two very related things
1. fixes `couch_debug:print_linked_processes(couch_index_server)`
2. adds `couch_index_debug` module with auxiliary functions to restart
`couch_index_server` processes safely.
## Testing recommendations
1. compile, start, remsh
2. `couch_debug:print_linked_processes(couch_index_server).`
```
|name | reductions |
message_queue_len | memory |id
|--------------------------------------------------|------------|-------------------|--------------|--
|index_server_1[<0.320.0>] | 1127 | 0
| 17000 |
| couch_secondary_services[<0.312.0>] | 93596 | 0
| 68632 |
| couch_event_listener:do_init/3[<0.323.0>] | 203 | 0
| 2856 |
| index_server_1[<0.320.0>] | 1127 | 0
| 17000 |
| | |
| |
|index_server_2[<0.324.0>] | 290 | 0
| 6088 |
| couch_secondary_services[<0.312.0>] | 93598 | 0
| 68632 |
| couch_event_listener:do_init/3[<0.326.0>] | 169 | 0
| 2856 |
| index_server_2[<0.324.0>] | 290 | 0
| 6088 |
....
```
3. `couch_index_debug:help().`
```
[names,print_linked_processes,busy,restart_busy,restart]
```
4. `couch_index_debug:help(names)`
5. `couch_index_debug:help(print_linked_processes)`
6. `couch_index_debug:help(busy)`
7. `couch_index_debug:help(restart_busy)`
8. `couch_index_debug:help(restart)`
9. Note pid of `whereis(index_server_8).` and do
`couch_index_debug:restart(index_server_8)`
## Related Issues or Pull Requests
- https://github.com/apache/couchdb/pull/3860
## Checklist
- [x] Code is written and works correctly
- [ ] Changes are covered by tests
- [ ] Any new configurable parameters are documented in
`rel/overlay/etc/default.ini`
- [ ] A PR for documentation changes has been made in
https://github.com/apache/couchdb-documentation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]