)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3002cfa3894ea41d02a8fb882d10a66f0bf51f1e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0c4b69cf_bf00802c","updated":"2021-12-15 16:24:12.000000000","message":"@Matt I took much of this into https://review.opendev.org/c/openstack/swift/+/821736/2 - thanks!","commit_id":"38e488349266464237abed3bfa92bad8d7159b2c"}],"swift/obj/updater.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e1272d2fa170dc7e656c22e83bbede9b9290460","unresolved":true,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def append(self, item):"},{"line_number":57,"context_line":"        popped \u003d None"},{"line_number":58,"context_line":"        if not self.deferred_enabled:"},{"line_number":59,"context_line":"            # cannot store item so return it"},{"line_number":60,"context_line":"            popped \u003d item"},{"line_number":61,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"0496185e_576ec908","line":58,"updated":"2021-12-15 11:02:15.000000000","message":"Now that I\u0027ve changed this to a bool, I guess I could just return it directly now.","commit_id":"4cea8316113a05ee992b02353d5218a041daa119"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b802088e25a8259c150442ed075cd827086e55f","unresolved":true,"context_lines":[{"line_number":46,"context_line":"class Bucket(object):"},{"line_number":47,"context_line":"    def __init__(self, update_delta, deferred_enabled):"},{"line_number":48,"context_line":"        self.update_delta \u003d update_delta"},{"line_number":49,"context_line":"        self.deferred_enabled \u003d deferred_enabled"},{"line_number":50,"context_line":"        self.last_time \u003d 0"},{"line_number":51,"context_line":"        self.deque \u003d deque()"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"eb5d25e3_fd68fd5b","line":49,"range":{"start_line":49,"start_character":8,"end_line":49,"end_character":48},"updated":"2021-12-15 10:37:56.000000000","message":"this doesn\u0027t seem to be used?","commit_id":"38e488349266464237abed3bfa92bad8d7159b2c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5a4ac6026dce8fb40f3fcbc02b75df12f34296f2","unresolved":true,"context_lines":[{"line_number":46,"context_line":"class Bucket(object):"},{"line_number":47,"context_line":"    def __init__(self, update_delta, deferred_enabled):"},{"line_number":48,"context_line":"        self.update_delta \u003d update_delta"},{"line_number":49,"context_line":"        self.deferred_enabled \u003d deferred_enabled"},{"line_number":50,"context_line":"        self.last_time \u003d 0"},{"line_number":51,"context_line":"        self.deque \u003d deque()"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"e5a11b33_d36ad57d","line":49,"range":{"start_line":49,"start_character":8,"end_line":49,"end_character":48},"in_reply_to":"eb5d25e3_fd68fd5b","updated":"2021-12-15 16:02:45.000000000","message":"OIC it can be init\u0027d differently","commit_id":"38e488349266464237abed3bfa92bad8d7159b2c"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e1272d2fa170dc7e656c22e83bbede9b9290460","unresolved":true,"context_lines":[{"line_number":54,"context_line":"        return self.last_time + self.update_delta"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def append(self, item):"},{"line_number":57,"context_line":"        if not self.deferred_enabled:"},{"line_number":58,"context_line":"            # cannot store item so return it"},{"line_number":59,"context_line":"            return item"},{"line_number":60,"context_line":"        self.deque.append(item)"}],"source_content_type":"text/x-python","patch_set":2,"id":"126eb824_9562afc0","line":57,"updated":"2021-12-15 11:02:15.000000000","message":"it\u0027s uses here, for when or if deferred queue is turned off","commit_id":"38e488349266464237abed3bfa92bad8d7159b2c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b802088e25a8259c150442ed075cd827086e55f","unresolved":true,"context_lines":[{"line_number":73,"context_line":"    def __lt__(self, other):"},{"line_number":74,"context_line":"        if isinstance(other, Bucket):"},{"line_number":75,"context_line":"            return self.wait_until() \u003c other.wait_until()"},{"line_number":76,"context_line":"        return self.wait_until() \u003c other"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"class BucketizedUpdateSkippingLimiter(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"57df32e9_a4dcaed2","line":76,"updated":"2021-12-15 10:37:56.000000000","message":"thanks! had that in mind but didn\u0027t get to writing it 😊","commit_id":"38e488349266464237abed3bfa92bad8d7159b2c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b802088e25a8259c150442ed075cd827086e55f","unresolved":true,"context_lines":[{"line_number":156,"context_line":"                    # Pop the oldest update from its bucket"},{"line_number":157,"context_line":"                    oldest_key \u003d self.deferred_bucket_order.pop(0)"},{"line_number":158,"context_line":"                    skipped \u003d self.buckets[oldest_key].popleft()"},{"line_number":159,"context_line":"                    self.skip_f([skipped])"},{"line_number":160,"context_line":"            # TODO: if shortest bucket queue * bucket_update_delta would take"},{"line_number":161,"context_line":"            # us past the end of the interval then we could choose to stop"},{"line_number":162,"context_line":"            # reading from disk and just drain the buckets for rest of the"}],"source_content_type":"text/x-python","patch_set":2,"id":"a2e0ff4e_f50e5104","line":159,"updated":"2021-12-15 10:37:56.000000000","message":"this is a nice idea. It does mean that we have another data structure that grows to max_deferred_elements but it\u0027s only storing keys\n\nCan\u0027t we just append the bucket to deferred_bucket_order rather than its key, to avoid looking up bucket-by-key?","commit_id":"38e488349266464237abed3bfa92bad8d7159b2c"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e1272d2fa170dc7e656c22e83bbede9b9290460","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                    # Pop the oldest update from its bucket"},{"line_number":157,"context_line":"                    oldest_key \u003d self.deferred_bucket_order.pop(0)"},{"line_number":158,"context_line":"                    skipped \u003d self.buckets[oldest_key].popleft()"},{"line_number":159,"context_line":"                    self.skip_f([skipped])"},{"line_number":160,"context_line":"            # TODO: if shortest bucket queue * bucket_update_delta would take"},{"line_number":161,"context_line":"            # us past the end of the interval then we could choose to stop"},{"line_number":162,"context_line":"            # reading from disk and just drain the buckets for rest of the"}],"source_content_type":"text/x-python","patch_set":2,"id":"36bcfb41_746ce284","line":159,"in_reply_to":"a2e0ff4e_f50e5104","updated":"2021-12-15 11:02:15.000000000","message":"oh that\u0027s true, I guess it would be by reference   so not taking more space.","commit_id":"38e488349266464237abed3bfa92bad8d7159b2c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b802088e25a8259c150442ed075cd827086e55f","unresolved":true,"context_lines":[{"line_number":181,"context_line":"                # wait for next element to be ready"},{"line_number":182,"context_line":"                eventlet.sleep(max(0, bucket.wait_until() - now))"},{"line_number":183,"context_line":"                item \u003d bucket.popleft()"},{"line_number":184,"context_line":"                bucket.last_time \u003d now"},{"line_number":185,"context_line":"                if len(bucket) \u003e 0:"},{"line_number":186,"context_line":"                    # bucket has more deferred elements, re-insert in queue in"},{"line_number":187,"context_line":"                    # correct chronological position"}],"source_content_type":"text/x-python","patch_set":2,"id":"be00ce78_b2986a14","line":184,"range":{"start_line":184,"start_character":35,"end_line":184,"end_character":38},"updated":"2021-12-15 10:37:56.000000000","message":"this doesn\u0027t look right - we\u0027ve slept since assigning now, and need last_time to move ahead to \u0027the new now\u0027","commit_id":"38e488349266464237abed3bfa92bad8d7159b2c"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e1272d2fa170dc7e656c22e83bbede9b9290460","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                # wait for next element to be ready"},{"line_number":182,"context_line":"                eventlet.sleep(max(0, bucket.wait_until() - now))"},{"line_number":183,"context_line":"                item \u003d bucket.popleft()"},{"line_number":184,"context_line":"                bucket.last_time \u003d now"},{"line_number":185,"context_line":"                if len(bucket) \u003e 0:"},{"line_number":186,"context_line":"                    # bucket has more deferred elements, re-insert in queue in"},{"line_number":187,"context_line":"                    # correct chronological position"}],"source_content_type":"text/x-python","patch_set":2,"id":"cd3a5529_da9376f6","line":184,"in_reply_to":"be00ce78_b2986a14","updated":"2021-12-15 11:02:15.000000000","message":"oh right, the sleep, your right :)","commit_id":"38e488349266464237abed3bfa92bad8d7159b2c"}]}
