Hi Gary, ack (code review only). Thanks Minh

On 16/11/18 5:38 pm, Gary Lee wrote:
node must be added to failover_list before SetState() is called.
If the state is 'end', then it will be deleted by SetState().
Otherwise, we will leave a node in 'End' state mistakenly in
failover_list.
---
  src/amf/amfd/ckpt_dec.cc | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/amf/amfd/ckpt_dec.cc b/src/amf/amfd/ckpt_dec.cc
index 022fa8f4b..a46f6d306 100644
--- a/src/amf/amfd/ckpt_dec.cc
+++ b/src/amf/amfd/ckpt_dec.cc
@@ -2990,8 +2990,12 @@ static uint32_t dec_node_failover_state(AVD_CL_CB *cb, 
NCS_MBCSV_CB_DEC *dec) {
              node->node_name.c_str());
      auto new_node = std::make_shared<NodeStateMachine>(cb,
        node->node_info.nodeId);
-    new_node->SetState(state);
+    // node must be added to failover_list before SetState() is called.
+    // If the state is 'end', then it will be deleted by SetState().
+    // Otherwise, we will leave a node in 'End' state mistakenly in
+    // failover_list.
      cb->failover_list[node->node_info.nodeId] = new_node;
+    new_node->SetState(state);
    }
return NCSCC_RC_SUCCESS;


_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to