• Y
    Proper error handling in dnodeOpenVnodes / dnodeCloseVnodes · 9336fd3d
    yifan hao 提交于
    * Description
    These two functions do not properly handle any error returned from
    dnodeGetVnodeList(). This patch als changes the signature of
    dnodeGetVnodeList() to make sure it returns only status, and number
    of vnodes is passed out through a separate argument.
    
    * Testing
    Before the patch, if I start taosd and then remove 'vnode' folder,
    the shutdown message would include the following:
    05/03 14:26:17.158204 0x140025950476096 DND total vnodes:-2147483296 are
    all closed
    
    This shows the code uses error code as vnode count.
    
    After the patch, it outputs proper error message:
    05/03 14:30:45.044762 0x139933723604800 DND Get dnode list failed
    9336fd3d
dnodeMgmt.c 5.9 KB