Closed cristic83 closed 6 years ago
The computation of the node to report if there is no higher seqno is wrong as it orders the nodes based on the modifiedIndex only without taking into consideration the highest seqNo. The proposed fix is to compute it as below:
node_to_bootstrap=$(cat /tmp/out | jq -c '.node.nodes[].nodes[]?' | grep seqno | tr ',:\"' ' ' | sort -k5,5r -k11 | head -1 | awk -F'/' '{print $(NF-1)}')
Hi @cristic83
Thanks for the proposed fix. Code is committed into entrypoint.sh. I'm closing this issue.
The computation of the node to report if there is no higher seqno is wrong as it orders the nodes based on the modifiedIndex only without taking into consideration the highest seqNo. The proposed fix is to compute it as below:
node_to_bootstrap=$(cat /tmp/out | jq -c '.node.nodes[].nodes[]?' | grep seqno | tr ',:\"' ' ' | sort -k5,5r -k11 | head -1 | awk -F'/' '{print $(NF-1)}')