)]}'
{"ceph-osd/templates/bin/osd/ceph-volume/_init-with-ceph-volume.sh.tpl":[{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"45f0197c64e15425b39ea8434ae4cf62b4f03d1e","unresolved":false,"context_lines":[{"line_number":358,"context_line":"       fi"},{"line_number":359,"context_line":"       BLOCK_DB\u003d${VG}/ceph-db-${osd_dev_string}"},{"line_number":360,"context_line":"    fi"},{"line_number":361,"context_line":"    flock -u \"${lock_fd}\""},{"line_number":362,"context_line":"    if [ -z ${BLOCK_DB} ] \u0026\u0026 [ -z ${BLOCK_WAL} ]; then"},{"line_number":363,"context_line":"      if pvdisplay ${OSD_DEVICE} | grep \"VG Name\" | awk \u0027{print $3}\u0027 | grep \"ceph\"; then"},{"line_number":364,"context_line":"        CEPH_LVM_PREPARE\u003d0"}],"source_content_type":"text/x-smarty","patch_set":1,"id":"1f493fa4_384ad054","line":361,"range":{"start_line":361,"start_character":4,"end_line":361,"end_character":25},"updated":"2020-04-21 05:03:29.000000000","message":"rather than moving this out of the conditional, why are we not moving the setup of the lock to within it? otherwise, if the statement on l196 is false, are we not just locking to immediately unlock?","commit_id":"686965864f1d8b4c006a33d13295c5145a356735"},{"author":{"_account_id":17119,"name":"Dmitrii Kabanov","email":"dmitrii.kabanov@att.com","username":"dk370c"},"change_message_id":"c0d4ec9c1ca522af5f3634033fbb5091fb2c788c","unresolved":false,"context_lines":[{"line_number":358,"context_line":"       fi"},{"line_number":359,"context_line":"       BLOCK_DB\u003d${VG}/ceph-db-${osd_dev_string}"},{"line_number":360,"context_line":"    fi"},{"line_number":361,"context_line":"    flock -u \"${lock_fd}\""},{"line_number":362,"context_line":"    if [ -z ${BLOCK_DB} ] \u0026\u0026 [ -z ${BLOCK_WAL} ]; then"},{"line_number":363,"context_line":"      if pvdisplay ${OSD_DEVICE} | grep \"VG Name\" | awk \u0027{print $3}\u0027 | grep \"ceph\"; then"},{"line_number":364,"context_line":"        CEPH_LVM_PREPARE\u003d0"}],"source_content_type":"text/x-smarty","patch_set":1,"id":"1f493fa4_2a88a8c4","line":361,"range":{"start_line":361,"start_character":4,"end_line":361,"end_character":25},"in_reply_to":"1f493fa4_384ad054","updated":"2020-04-21 19:17:13.000000000","message":"We are checking several options in this portion of code:\nif-then (#196)\nelif (#298)\nelif (#329)\nfi(#360)\nI think it\u0027s better to get the lock before the if statement and release the lock right after the line #360. Such way allows us to get the lock for all the cases which we are checking and release it when we do not need it any more. Otherwise, we will not release the lock in some cases or we will get the lock in some cases. Which will leads to the issues.","commit_id":"686965864f1d8b4c006a33d13295c5145a356735"}]}
