-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/doc: add monitor janitorial list
Signed-off-by: Joao Eduardo Luis <[email protected]>
- Loading branch information
Joao Eduardo Luis
authored and
Joao Eduardo Luis
committed
Dec 30, 2014
1 parent
dfee5e5
commit dfd6a38
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Items to work on the monitor: | ||
|
||
Low-hanging fruit: | ||
|
||
- audit helpers that put() messages but do not get() them. | ||
where possible, get rid of those put(). No one expects helpers to | ||
put() messages and that may lead to double frees. | ||
|
||
Medium complexity: | ||
|
||
- get rid of QuorumServices. It seemed like a neat idea, but we only have | ||
one or two and they just add complexity and noise. | ||
|
||
Time consuming / complex: | ||
|
||
- Split the OSDMonitor.cc file into auxiliary files. This will mean: | ||
|
||
1. Logically split subsystems (osd crush, osd pool, ...) | ||
2. Split the big badass functions, especially prepare/process_command() | ||
|
||
- Have Tracked Ops on the monitor, similarly to the OSDs. | ||
|
||
1. Instead of passing messages back and forth, we will pass OpRequests | ||
2. We may be able to get() the message when we create the OpRequest and | ||
put() it upon OpRequest destruction. This will help controlling the | ||
lifespan of messages and reduce leaks. | ||
3. There will be a fair amount of work changing stuff from Messages to | ||
OpRequests, and we will need to make sure that we reach a format that | ||
is easily supported throughout the monitor | ||
|
||
Possible format, off the top of my head: | ||
|
||
MonOpRequest: | ||
|
||
int op = m->get_type(); | ||
Message *m = m.get(); | ||
|
||
template<typename T> | ||
T* get_message() { return (T*)m.get(); } | ||
|
||
- Move to Ref'erenced messages instead of pointers all around. This would | ||
also help with the Tracked Ops thing, as we'd be able to simply ignore all | ||
the get() and put() stuff behind it. |