)]}'
{"nova/objects/build_request.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387511e6e3549c1d155eebccdcd5e78e9c1d4219","unresolved":false,"context_lines":[{"line_number":371,"context_line":"    @base.remotable_classmethod"},{"line_number":372,"context_line":"    def get_by_filters(cls, context, filters, limit\u003dNone, marker\u003dNone,"},{"line_number":373,"context_line":"                       sort_keys\u003dNone, sort_dirs\u003dNone):"},{"line_number":374,"context_line":"        if limit \u003d\u003d 0:"},{"line_number":375,"context_line":"            return cls(context, objects\u003d[])"},{"line_number":376,"context_line":"        # \u0027deleted\u0027 records can not be returned from here since build_requests"},{"line_number":377,"context_line":"        # are not soft deleted."},{"line_number":378,"context_line":"        if filters.get(\u0027deleted\u0027, False):"},{"line_number":379,"context_line":"            return cls(context, objects\u003d[])"},{"line_number":380,"context_line":"        # \u0027cleaned\u0027 records won\u0027t exist as they would need to be deleted."},{"line_number":381,"context_line":"        if filters.get(\u0027cleaned\u0027, False):"},{"line_number":382,"context_line":"            return cls(context, objects\u003d[])"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        # Because the build_requests table stores an instance as a serialized"},{"line_number":385,"context_line":"        # versioned object it is not feasible to do the filtering and sorting"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_73e8a77b","line":382,"range":{"start_line":374,"start_character":8,"end_line":382,"end_character":43},"updated":"2019-10-22 21:23:38.000000000","message":"Gah, these all mean we short-circuit which makes this wrong:\n\nhttps://review.opendev.org/#/c/527564/1/nova/compute/api.py@2362\n\nSee https://bugs.launchpad.net/nova/+bug/1773945","commit_id":"1706e3989157f912bce99beb99c75216a064eb2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"922741f7d88c742298e5c8f1aadede18ffb58e9e","unresolved":false,"context_lines":[{"line_number":386,"context_line":"        # in the database. Just get all potentially relevant records and"},{"line_number":387,"context_line":"        # process them here. It should be noted that build requests are short"},{"line_number":388,"context_line":"        # lived so there should not be a lot of results to deal with."},{"line_number":389,"context_line":"        build_requests \u003d cls.get_all(context)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        # Fortunately some filters do not apply here."},{"line_number":392,"context_line":"        # \u0027changes-since\u0027 works off of the updated_at field which has not yet"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_0e203cf7","line":389,"updated":"2017-12-13 15:36:49.000000000","message":"I was wondering if we could use BuildRequest.get_by_instance_uuid to do the lookup if we had a marker, but I don\u0027t think that really works because even if we found the marker, I\u0027m not sure how we use that to only pull build requests after that marker - would we do it based on sort keys/direction?\n\nJust trying to think if there is a more efficient way to get build requests here rather than getting all of them and then whittling them down later.","commit_id":"1706e3989157f912bce99beb99c75216a064eb2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7039b1f3cb360883d7f97651c07a61efe3fe8662","unresolved":false,"context_lines":[{"line_number":386,"context_line":"        # in the database. Just get all potentially relevant records and"},{"line_number":387,"context_line":"        # process them here. It should be noted that build requests are short"},{"line_number":388,"context_line":"        # lived so there should not be a lot of results to deal with."},{"line_number":389,"context_line":"        build_requests \u003d cls.get_all(context)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        # Fortunately some filters do not apply here."},{"line_number":392,"context_line":"        # \u0027changes-since\u0027 works off of the updated_at field which has not yet"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_cebc946e","line":389,"in_reply_to":"df87a7cf_0e203cf7","updated":"2017-12-13 15:40:45.000000000","message":"Another idea, to optimize this, but if we have a marker, lookup the build request right away and if not found, bail early with MarkerNotFound so we don\u0027t do the get_all() and filtering below. I would think chances are that most times the marker is not going to be in the build_requests table.","commit_id":"1706e3989157f912bce99beb99c75216a064eb2d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a2177e49aa5f6c3246f97f0a211931601ddc24f8","unresolved":false,"context_lines":[{"line_number":386,"context_line":"        # in the database. Just get all potentially relevant records and"},{"line_number":387,"context_line":"        # process them here. It should be noted that build requests are short"},{"line_number":388,"context_line":"        # lived so there should not be a lot of results to deal with."},{"line_number":389,"context_line":"        build_requests \u003d cls.get_all(context)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        # Fortunately some filters do not apply here."},{"line_number":392,"context_line":"        # \u0027changes-since\u0027 works off of the updated_at field which has not yet"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_ec9e40b7","line":389,"in_reply_to":"df87a7cf_cebc946e","updated":"2017-12-13 16:12:32.000000000","message":"I think we trade one-shot database access for two-shot in cases where the marker is found. At the moment, I\u0027m not sure I see that there\u0027s a huge gain to be had, but if we learn that we need optimization here, then we could work on that, yeah.","commit_id":"1706e3989157f912bce99beb99c75216a064eb2d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"ac5fe1e19b0adea8ea3c4eba4b577771c7ef0a19","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                if build_req.instance.uuid \u003d\u003d marker:"},{"line_number":448,"context_line":"                    marker_index \u003d i"},{"line_number":449,"context_line":"                    break"},{"line_number":450,"context_line":"            else:"},{"line_number":451,"context_line":"                raise exception.MarkerNotFound(marker\u003dmarker)"},{"line_number":452,"context_line":"        len_build_reqs \u003d len(sorted_build_reqs)"},{"line_number":453,"context_line":"        limit_index \u003d len_build_reqs"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_91b6b18a","line":450,"updated":"2017-12-13 16:23:07.000000000","message":"Huh, this is the first time I\u0027ve seen for-else.","commit_id":"1706e3989157f912bce99beb99c75216a064eb2d"}]}
