)]}'
{"swift/container/replicator.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f23d1a68b6716d1c67dfb92547503c9b4468d84b","unresolved":true,"context_lines":[{"line_number":36,"context_line":"def merge_remote_own_shard_range(local_osr, remote_osr):"},{"line_number":37,"context_line":"    if isinstance(remote_osr, dict):"},{"line_number":38,"context_line":"        remote_osr \u003d ShardRange(**remote_osr)"},{"line_number":39,"context_line":"    if local_osr and local_osr.epoch and remote_osr.epoch is None:"},{"line_number":40,"context_line":"        return False"},{"line_number":41,"context_line":"    return True"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"119b4312_188f909e","side":"PARENT","line":39,"range":{"start_line":39,"start_character":7,"end_line":39,"end_character":36},"updated":"2021-09-27 05:29:08.000000000","message":"Is the logging going to be a little noisy now that we\u0027ve dropped this? Or is there really *no reason* we should ever be merging an own-shard-range with None epoch?","commit_id":"8f3f9fe45b5aa6b46c11d6e92b5aaffbcfb93b12"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"905ef36a61d39443294a131a59270d5cafc4d822","unresolved":true,"context_lines":[{"line_number":36,"context_line":"def merge_remote_own_shard_range(local_osr, remote_osr):"},{"line_number":37,"context_line":"    if isinstance(remote_osr, dict):"},{"line_number":38,"context_line":"        remote_osr \u003d ShardRange(**remote_osr)"},{"line_number":39,"context_line":"    if local_osr and local_osr.epoch and remote_osr.epoch is None:"},{"line_number":40,"context_line":"        return False"},{"line_number":41,"context_line":"    return True"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"00d8ff2f_16ccbae3","side":"PARENT","line":39,"range":{"start_line":39,"start_character":7,"end_line":39,"end_character":36},"in_reply_to":"119b4312_188f909e","updated":"2021-09-27 06:34:04.000000000","message":"I worry about shards if we remove this. By default a shard will have an OSR but no epoch because it isn\u0027t sharding. I guess we could argue that there shouldn\u0027t be shards to share, but sharing their epochs if both the same seems to make sense, so they agree on state, right?\n\nWhen turning on something like shrinking and we tell one acceptor that it\u0027s range has increased we expect it to replicate to the other primarys for the shard, and without this check this might break it. Oh, but this may be ok, in the new world order of shrinking we plan to be root driven. Update the acceptor in the root and it\u0027ll pull down and merge roots view.. so shrinking \"should\" be ok.\n\nFact that shards don\u0027t have epoch if why I went to the effort of this check.","commit_id":"8f3f9fe45b5aa6b46c11d6e92b5aaffbcfb93b12"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f23d1a68b6716d1c67dfb92547503c9b4468d84b","unresolved":true,"context_lines":[{"line_number":47,"context_line":"    if remote_osr:"},{"line_number":48,"context_line":"        remote_index, remote_osr \u003d remote_osr[0]"},{"line_number":49,"context_line":"        if not merge_remote_own_shard_range("},{"line_number":50,"context_line":"                broker.get_own_shard_range(), remote_osr):"},{"line_number":51,"context_line":"            logger.debug(\"Not merging remote own_shard_range \""},{"line_number":52,"context_line":"                         \"into %s\", broker.db_file)"},{"line_number":53,"context_line":"            shards.pop(remote_index)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7c7e62eb_659bcb49","side":"PARENT","line":50,"range":{"start_line":50,"start_character":16,"end_line":50,"end_character":44},"updated":"2021-09-27 05:29:08.000000000","message":"Yeah, the previous patch was doing the DB call too much.","commit_id":"8f3f9fe45b5aa6b46c11d6e92b5aaffbcfb93b12"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"905ef36a61d39443294a131a59270d5cafc4d822","unresolved":true,"context_lines":[{"line_number":47,"context_line":"    if remote_osr:"},{"line_number":48,"context_line":"        remote_index, remote_osr \u003d remote_osr[0]"},{"line_number":49,"context_line":"        if not merge_remote_own_shard_range("},{"line_number":50,"context_line":"                broker.get_own_shard_range(), remote_osr):"},{"line_number":51,"context_line":"            logger.debug(\"Not merging remote own_shard_range \""},{"line_number":52,"context_line":"                         \"into %s\", broker.db_file)"},{"line_number":53,"context_line":"            shards.pop(remote_index)"}],"source_content_type":"text/x-python","patch_set":1,"id":"81dd07d8_537d887e","side":"PARENT","line":50,"range":{"start_line":50,"start_character":16,"end_line":50,"end_character":44},"in_reply_to":"7c7e62eb_659bcb49","updated":"2021-09-27 06:34:04.000000000","message":"was it, I thought it would only call it once on each side of replication (ie on the sender and the rpc. Though I think I need to reload it all after my vacation 😊","commit_id":"8f3f9fe45b5aa6b46c11d6e92b5aaffbcfb93b12"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e76a4eccb60e6b2ddfc47c1b611d140c40d13703","unresolved":true,"context_lines":[{"line_number":35,"context_line":"def check_merge_own_shard_range(shards, broker, logger):"},{"line_number":36,"context_line":"    to_merge \u003d []"},{"line_number":37,"context_line":"    for shard in shards:"},{"line_number":38,"context_line":"        if shard[\u0027name\u0027] \u003d\u003d broker.path and shard[\u0027epoch\u0027] is None:"},{"line_number":39,"context_line":"            logger.warning(\u0027Ignoring remote osr w/o epoch: %r\u0027, shard)"},{"line_number":40,"context_line":"            continue"},{"line_number":41,"context_line":"        to_merge.append(shard)"}],"source_content_type":"text/x-python","patch_set":1,"id":"182f9709_dba19964","line":38,"updated":"2021-09-27 11:13:05.000000000","message":"as Matt pointed out, this will be triggered by shards (which have no epoch):\n\nwith this patch I see these logs on a healthy system:\n\n  Sep 27 09:48:43 saio container-6031[22255]: Ignoring remote osr w/o epoch: {u\u0027object_count\u0027: 4, u\u0027lower\u0027: u\u0027obj-0002\u0027, u\u0027name\u0027: u\u0027.shards_AUTH_test/container-974d0ea4-189f-443f-89f8-5696c7dbf12f-91de5461f984a9ec07018\n\ncan we add `broker.db_epoch is not None` to the condition to narrow this warning to shard[ing|ed] db\u0027s without needing to query own_sr? or just query own_sr for epoch is not None (which might be more explicit).","commit_id":"ef0fbbbe0f3555ec4d22fbf6b79bb686b6adccbd"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d2585c3eb2b56a46292a1658cd060774bbd3f8a1","unresolved":true,"context_lines":[{"line_number":35,"context_line":"def check_merge_own_shard_range(shards, broker, logger):"},{"line_number":36,"context_line":"    to_merge \u003d []"},{"line_number":37,"context_line":"    for shard in shards:"},{"line_number":38,"context_line":"        if shard[\u0027name\u0027] \u003d\u003d broker.path and shard[\u0027epoch\u0027] is None:"},{"line_number":39,"context_line":"            logger.warning(\u0027Ignoring remote osr w/o epoch: %r\u0027, shard)"},{"line_number":40,"context_line":"            continue"},{"line_number":41,"context_line":"        to_merge.append(shard)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ddcd1834_f0a10352","line":38,"in_reply_to":"182f9709_dba19964","updated":"2021-09-27 15:48:36.000000000","message":"boo; ok something has to change then - nice find.\n\nBut, I\u0027m not so sure why a shard shouldn\u0027t have an epoch - someone must have decided to create it, wouldn\u0027t they want to jot down WHEN the came to this conclusion? (seems like an epoch could be useful when resolving split paths)","commit_id":"ef0fbbbe0f3555ec4d22fbf6b79bb686b6adccbd"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"69f5799f736252446b548446cbba133842f71f2a","unresolved":true,"context_lines":[{"line_number":36,"context_line":"    to_merge \u003d []"},{"line_number":37,"context_line":"    for shard in shards:"},{"line_number":38,"context_line":"        if shard[\u0027name\u0027] \u003d\u003d broker.path and shard[\u0027epoch\u0027] is None:"},{"line_number":39,"context_line":"            logger.warning(\u0027Ignoring remote osr w/o epoch: %r\u0027, shard)"},{"line_number":40,"context_line":"            continue"},{"line_number":41,"context_line":"        to_merge.append(shard)"},{"line_number":42,"context_line":"    return to_merge"}],"source_content_type":"text/x-python","patch_set":1,"id":"cb57a358_7a7325e9","line":39,"updated":"2021-09-27 06:53:10.000000000","message":"Yup, this should be warning. I\u0027ll update this in the parent patch while this discussion here continues.","commit_id":"ef0fbbbe0f3555ec4d22fbf6b79bb686b6adccbd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e76a4eccb60e6b2ddfc47c1b611d140c40d13703","unresolved":true,"context_lines":[{"line_number":39,"context_line":"            logger.warning(\u0027Ignoring remote osr w/o epoch: %r\u0027, shard)"},{"line_number":40,"context_line":"            continue"},{"line_number":41,"context_line":"        to_merge.append(shard)"},{"line_number":42,"context_line":"    return to_merge"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class ContainerReplicator(db_replicator.Replicator):"}],"source_content_type":"text/x-python","patch_set":1,"id":"811fc800_44eeb898","line":42,"updated":"2021-09-27 11:13:05.000000000","message":"+1 return a new list, no side-effects","commit_id":"ef0fbbbe0f3555ec4d22fbf6b79bb686b6adccbd"}]}
