Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / doc / mon-janitorial-queue.txt
1 Items to work on the monitor:
2
3 Low-hanging fruit:
4
5 - audit helpers that put() messages but do not get() them.
6   where possible, get rid of those put().  No one expects helpers to
7   put() messages and that may lead to double frees.
8
9 Medium complexity:
10
11 - get rid of QuorumServices.  It seemed like a neat idea, but we only have
12   one or two and they just add complexity and noise.
13
14 Time consuming / complex:
15
16 - Split the OSDMonitor.cc file into auxiliary files.  This will mean:
17
18   1. Logically split subsystems (osd crush, osd pool, ...)
19   2. Split the big badass functions, especially prepare/process_command()
20
21 - Have Tracked Ops on the monitor, similarly to the OSDs.
22
23   1. Instead of passing messages back and forth, we will pass OpRequests
24   2. We may be able to get() the message when we create the OpRequest and
25      put() it upon OpRequest destruction.  This will help controlling the
26      lifespan of messages and reduce leaks.
27   3. There will be a fair amount of work changing stuff from Messages to
28      OpRequests, and we will need to make sure that we reach a format that
29      is easily supported throughout the monitor
30
31   Possible format, off the top of my head:
32
33     MonOpRequest:
34
35       int op = m->get_type();
36       Message *m = m.get();
37
38       template<typename T>
39       T* get_message() { return (T*)m.get(); }
40
41 - Move to Ref'erenced messages instead of pointers all around.  This would
42   also help with the Tracked Ops thing, as we'd be able to simply ignore all
43   the get() and put() stuff behind it.