summaryrefslogtreecommitdiffstats
path: root/src/doc/mon-janitorial-queue.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/doc/mon-janitorial-queue.txt
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/doc/mon-janitorial-queue.txt')
-rw-r--r--src/doc/mon-janitorial-queue.txt38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/doc/mon-janitorial-queue.txt b/src/doc/mon-janitorial-queue.txt
new file mode 100644
index 000000000..9114acbe7
--- /dev/null
+++ b/src/doc/mon-janitorial-queue.txt
@@ -0,0 +1,38 @@
+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.
+
+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.