)]}'
{"ironic_inspector/node_cache.py":[{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"c2a2fc55fee845ae735aa355e15d408ab319bd07","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self._attributes \u003d None"},{"line_number":67,"context_line":"        self._ironic \u003d ironic"},{"line_number":68,"context_line":"        self._lock \u003d lock if lock is not None else _get_lock(uuid)"},{"line_number":69,"context_line":"        self._locked \u003d lock is not None"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def __del__(self):"},{"line_number":72,"context_line":"        if self._locked:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_8713230d","line":69,"updated":"2015-11-13 19:09:03.000000000","message":"setting the self._locked flag upon instantiation....","commit_id":"57351472d168cfa7dc9cb6d81ea7907040d5c207"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"c2a2fc55fee845ae735aa355e15d408ab319bd07","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def acquire_lock(self, blocking\u003dTrue):"},{"line_number":78,"context_line":"        \"\"\"Acquire a lock on this node.\"\"\""},{"line_number":79,"context_line":"        if self._locked:"},{"line_number":80,"context_line":"            return True"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if self._lock.acquire(blocking):"},{"line_number":83,"context_line":"            self._locked \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_a7d2e732","line":80,"updated":"2015-11-13 19:09:03.000000000","message":"...hinders calling self._lock.acquire() here","commit_id":"57351472d168cfa7dc9cb6d81ea7907040d5c207"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"c2a2fc55fee845ae735aa355e15d408ab319bd07","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            return True"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if self._lock.acquire(blocking):"},{"line_number":83,"context_line":"            self._locked \u003d True"},{"line_number":84,"context_line":"            return True"},{"line_number":85,"context_line":"        else:"},{"line_number":86,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_c7f28b6f","line":83,"updated":"2015-11-13 19:09:03.000000000","message":"setting self._locked \u003d True will hinder any further self._lock.acquire() call i.e. making these calls parallel/possible/successfully returning True simultaneously:\n    thread_1: node_info.acquire_lock()\n    thread_2: node_info.acquire_lock()","commit_id":"57351472d168cfa7dc9cb6d81ea7907040d5c207"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"f83583a7f5031400ebb09bb0db6d7a8425da56c1","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def acquire_lock(self, blocking\u003dTrue):"},{"line_number":87,"context_line":"        \"\"\"Acquire a lock on the associated node."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        Exists with success if a lock is already acquired using this NodeInfo"},{"line_number":90,"context_line":"        object."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        :param blocking: if True, wait for lock to be acquired, otherwise"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_a55534fb","line":89,"updated":"2015-11-20 13:56:04.000000000","message":"Typo: should be Exits ...","commit_id":"4e3eb060875c046fa785049b63028df02dcb6710"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"f83583a7f5031400ebb09bb0db6d7a8425da56c1","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        object."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        :param blocking: if True, wait for lock to be acquired, otherwise"},{"line_number":93,"context_line":"                         return immediately."},{"line_number":94,"context_line":"        :returns: boolean value, whether lock was acquired successfully"},{"line_number":95,"context_line":"        \"\"\""},{"line_number":96,"context_line":"        if self._locked:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_eaceabb6","line":93,"updated":"2015-11-20 13:56:04.000000000","message":"add: doesn\u0027t have any effect if the lock has already been acquired before","commit_id":"4e3eb060875c046fa785049b63028df02dcb6710"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"f83583a7f5031400ebb09bb0db6d7a8425da56c1","unresolved":false,"context_lines":[{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    :param uuid: node UUID."},{"line_number":434,"context_line":"    :param ironic: optional ironic client instance"},{"line_number":435,"context_line":"    :param locked: if True, get a lock on node before fetching its data"},{"line_number":436,"context_line":"    :returns: structure NodeInfo."},{"line_number":437,"context_line":"    \"\"\""},{"line_number":438,"context_line":"    if locked:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_aacf4328","line":435,"updated":"2015-11-20 13:56:04.000000000","message":"add: blocks","commit_id":"4e3eb060875c046fa785049b63028df02dcb6710"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"f83583a7f5031400ebb09bb0db6d7a8425da56c1","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        for u in uuids:"},{"line_number":552,"context_line":"            node_info \u003d get_node(u, locked\u003dTrue)"},{"line_number":553,"context_line":"            try:"},{"line_number":554,"context_line":"                if node_info.finished_at or node_info.started_at \u003e threshold:"},{"line_number":555,"context_line":"                    continue"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"                db.model_query(db.Node, session\u003dsession).filter_by("}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_5f0bf72b","line":554,"updated":"2015-11-20 13:56:04.000000000","message":"move the test outside of the try--finally block as the continue statement raises an exception and thus always triggers releasing lock (even on a node that shouldn\u0027t be cleaned up yet)","commit_id":"4e3eb060875c046fa785049b63028df02dcb6710"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3ed81d914074ce2dd10dbad4ceb1e158a7ae6536","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        for u in uuids:"},{"line_number":552,"context_line":"            node_info \u003d get_node(u, locked\u003dTrue)"},{"line_number":553,"context_line":"            try:"},{"line_number":554,"context_line":"                if node_info.finished_at or node_info.started_at \u003e threshold:"},{"line_number":555,"context_line":"                    continue"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"                db.model_query(db.Node, session\u003dsession).filter_by("}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_a3016908","line":554,"in_reply_to":"ba8a016a_5f0bf72b","updated":"2015-11-23 11:58:01.000000000","message":"having discussed this with Dmitry over irc, it is a desired behavior as the get_node call acquires a lock on the node\u0027s uuid, never mind my previous comment.","commit_id":"4e3eb060875c046fa785049b63028df02dcb6710"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"9b985d552fad7494c753dc30ad7671274fbf3208","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def acquire_lock(self, blocking\u003dTrue):"},{"line_number":87,"context_line":"        \"\"\"Acquire a lock on the associated node."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        Exists with success if a lock is already acquired using this NodeInfo"},{"line_number":90,"context_line":"        object."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        :param blocking: if True, wait for lock to be acquired, otherwise"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a8ffd7b_dd399ca5","line":89,"updated":"2015-11-27 11:04:49.000000000","message":"typo: Exists","commit_id":"95a29ce819fadefcc5a433a2a3978eeb3cd45211"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"e931b4982d7754a56dc4d03c611024ca81cf5cd4","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def __del__(self):"},{"line_number":81,"context_line":"        if self._locked:"},{"line_number":82,"context_line":"            LOG.warning(_LW(\u0027BUG: node lock was not released by the moment \u0027"},{"line_number":83,"context_line":"                            \u0027node info object is deleted\u0027))"},{"line_number":84,"context_line":"            self._lock.release()"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_1190d6eb","line":82,"updated":"2015-12-01 09:53:23.000000000","message":"if we treat such possibility as a bug, shouldn\u0027t it be LOG.error?","commit_id":"2b8cc3a93f409d520ef2d038b935d061449a9ef0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6f6807f5310f05013ccb6628e3417f7ad6ba2f35","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def __del__(self):"},{"line_number":81,"context_line":"        if self._locked:"},{"line_number":82,"context_line":"            LOG.warning(_LW(\u0027BUG: node lock was not released by the moment \u0027"},{"line_number":83,"context_line":"                            \u0027node info object is deleted\u0027))"},{"line_number":84,"context_line":"            self._lock.release()"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_accf31b2","line":82,"in_reply_to":"9a8ffd7b_1190d6eb","updated":"2015-12-01 09:57:14.000000000","message":"well, that\u0027s not an error really, it won\u0027t break anything. but that\u0027s dangerous and should be reported. in the future this __del__ thing will probably be deleted","commit_id":"2b8cc3a93f409d520ef2d038b935d061449a9ef0"}]}
