)]}'
{"swift/cli/manage_shard_ranges.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a2831ae63e0d1c5fa9beafec267d977def41852b","unresolved":true,"context_lines":[{"line_number":174,"context_line":"DEFAULT_SHRINK_THRESHOLD \u003d 10000"},{"line_number":175,"context_line":"DEFAULT_MAX_SHRINKING \u003d 1"},{"line_number":176,"context_line":"DEFAULT_MAX_EXPANDING \u003d -1"},{"line_number":177,"context_line":"DEFAULT_SHRINKING_CREATED_TIMEOUT \u003d 172800"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"def _print_shard_range(sr, level\u003d0):"}],"source_content_type":"text/x-python","patch_set":1,"id":"846693f1_464bae6d","line":177,"updated":"2021-03-01 10:13:17.000000000","message":"we might want to come up with some sort of comment about how this should relate to sharder and replicator cycle times etc","commit_id":"934aa003bce1af66670813110e420a1c2a35ffd8"}],"swift/container/sharder.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a2831ae63e0d1c5fa9beafec267d977def41852b","unresolved":true,"context_lines":[{"line_number":129,"context_line":"    if (created_timeout and ShardRange.ACTIVE in states and"},{"line_number":130,"context_line":"            shard_range.state \u003d\u003d ShardRange.ACTIVE):"},{"line_number":131,"context_line":"        # Need to do a created time check"},{"line_number":132,"context_line":"        if shard_range.timestamp + created_timeout \u003e Timestamp.now().timestamp:"},{"line_number":133,"context_line":"            return False"},{"line_number":134,"context_line":"    return shard_range.state in states"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"84b174f7_da4bb1f4","line":132,"range":{"start_line":132,"start_character":8,"end_line":132,"end_character":51},"updated":"2021-03-01 10:13:17.000000000","message":"+1 I think this is the metric to use\n\ndo we need to check its ACTIVE ? do we change the timestamp when moving to SHRINKING? Might be as simple as\n\n  sr.state in states and sr.timestamp + created_timout \u003c now","commit_id":"934aa003bce1af66670813110e420a1c2a35ffd8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a2831ae63e0d1c5fa9beafec267d977def41852b","unresolved":true,"context_lines":[{"line_number":129,"context_line":"    if (created_timeout and ShardRange.ACTIVE in states and"},{"line_number":130,"context_line":"            shard_range.state \u003d\u003d ShardRange.ACTIVE):"},{"line_number":131,"context_line":"        # Need to do a created time check"},{"line_number":132,"context_line":"        if shard_range.timestamp + created_timeout \u003e Timestamp.now().timestamp:"},{"line_number":133,"context_line":"            return False"},{"line_number":134,"context_line":"    return shard_range.state in states"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"71ddd996_0ccc861d","line":132,"range":{"start_line":132,"start_character":68,"end_line":132,"end_character":78},"updated":"2021-03-01 10:13:17.000000000","message":"is this necessary? - I *think* we can compare Timestamp instances","commit_id":"934aa003bce1af66670813110e420a1c2a35ffd8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a2831ae63e0d1c5fa9beafec267d977def41852b","unresolved":true,"context_lines":[{"line_number":134,"context_line":"    return shard_range.state in states"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"def is_shrinking_candidate(shard_range, shrink_threshold, merge_size,"},{"line_number":138,"context_line":"                           states\u003dNone, created_timeout\u003dNone):"},{"line_number":139,"context_line":"    # typically shrink_threshold \u003c merge_size but check both just in case"},{"line_number":140,"context_line":"    states \u003d states or (ShardRange.ACTIVE,)"}],"source_content_type":"text/x-python","patch_set":1,"id":"59e280df_723f4c6a","line":137,"range":{"start_line":137,"start_character":4,"end_line":137,"end_character":26},"updated":"2021-03-01 10:13:17.000000000","message":"off-topic: BTW, I broke out this function thinking we may want to add a number to recon dump for \u0027number of shards that could be shrunk if the tool could do it\u0027, in which case states\u003dACTIVE. But at the moment IIRC its always called with states\u003d(ACTIVE, SHRINKING)","commit_id":"934aa003bce1af66670813110e420a1c2a35ffd8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a2831ae63e0d1c5fa9beafec267d977def41852b","unresolved":true,"context_lines":[{"line_number":533,"context_line":"        self.cleave_row_batch_size \u003d config_positive_int_value("},{"line_number":534,"context_line":"            conf.get(\u0027cleave_row_batch_size\u0027, 10000))"},{"line_number":535,"context_line":"        self.shrinking_created_timeout \u003d config_positive_int_value("},{"line_number":536,"context_line":"            conf.get(\u0027shrinking_created_timeout\u0027, 172800))"},{"line_number":537,"context_line":"        self.auto_shard \u003d config_true_value(conf.get(\u0027auto_shard\u0027, False))"},{"line_number":538,"context_line":"        self.sharding_candidates \u003d []"},{"line_number":539,"context_line":"        self.shrinking_candidates \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"b094e1f1_9df0d81f","line":536,"range":{"start_line":536,"start_character":22,"end_line":536,"end_character":47},"updated":"2021-03-01 10:13:17.000000000","message":"nit: minor thing, for me \u0027timeout\u0027 implies waiting for something that should have happened, and \u0027error\u0027 if not. At least that\u0027s often the usage.\n\nNot sure I have a *better* idea though :) \u0027shrinking_age\u0027 maybe has some consistency with \u0027reclaim_age\u0027?? i.e. \u0027has to be this old before it can be [shrunk | reclaimed]\u0027","commit_id":"934aa003bce1af66670813110e420a1c2a35ffd8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b5ce686dbcec55e606c3e59c9b3899074c0f0131","unresolved":true,"context_lines":[{"line_number":127,"context_line":"def shrinking_state_check(shard_range, states, active_age):"},{"line_number":128,"context_line":"    if (active_age and shard_range.state in states and"},{"line_number":129,"context_line":"            shard_range.state \u003d\u003d ShardRange.ACTIVE):"},{"line_number":130,"context_line":"        if shard_range.state_timestamp.timestamp + active_age \u003e \\"},{"line_number":131,"context_line":"                Timestamp.now().timestamp:"},{"line_number":132,"context_line":"            return False"},{"line_number":133,"context_line":"    return shard_range.state in states"}],"source_content_type":"text/x-python","patch_set":2,"id":"d2e599ce_c6559c84","line":130,"updated":"2021-03-16 20:35:57.000000000","message":"ok, so here you use the state timestamp, and this is now exactly when the shard went ACTIVE","commit_id":"0f970a67a8ddb6647089985c1757ecda718b7768"}]}
