Commit Graph

12 Commits

Author SHA1 Message Date
Bomin Zhang b87f9ae0c7 defer cq creation 2020-07-16 11:27:22 +08:00
Bomin Zhang 40c1d665b5 fix some issues 2020-06-06 14:45:22 +08:00
Bomin Zhang d34cabf2c1 TD-449: fix several bugs 2020-06-06 14:45:22 +08:00
yifan hao e061343664 [Dnode] Table driven method to init and cleanup dnode components.
This patch refactors the initialization and cleanup path of dnode
with a table driven method. This fixes the following issues:

1. Before the patch, if dnodeInitRead() fails, the cleanup path
also runs dnodeCleanupWrite(), which will free wWorkerPool.writeWorker that's
never allocated. (The code before this patch will not crash though, because
wWorkerPool is zero-initialized global variable and therefore the
accidental free will be a nop).
2. In general the order of calling cleanup function should be reverse
to the order of calling init function, but this is not the case prior
to this patch (see dnodeCleanupMnode() and dnodeCleanupMgmt()).

* Bonus fix
This patch also fixes a missing free for readPool.readWorker.

* Testing
I plan to run the test script ./test-all.sh, but was not able to do so.
Is there a reference somewhere I can look up?
2020-05-04 22:52:17 -06:00
slguan 19b1d449de rearrange code directory 2020-04-17 00:07:09 +08:00
slguan 053280da8a [TD-10] add dnode status message 2020-03-18 17:31:52 +08:00
slguan 3006a756c9 refactor dnode module code 2020-03-11 10:41:00 +08:00
slguan 88b413ccc7 fix compile error in dnode module 2020-03-08 21:52:53 +08:00
slguan 79341c73d2 reorgnize mgmtDnode.c 2020-02-20 21:10:42 +08:00
slguan 4cce8fbb27 dnode 2020-02-19 14:34:56 +08:00
slguan 2abbf43606 #1177 2020-02-06 21:01:23 +08:00
slguan 0ca664d876 #1177 2020-02-05 21:36:58 +08:00