)]}'
{"id":"openstack%2Fswift~840408","triplet_id":"openstack%2Fswift~master~If68f06dec85346818f5c08783eecee8592c24684","project":"openstack/swift","branch":"master","topic":"no-stats-update-before-CLEAVED","attention_set":{"7233":{"account":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"last_update":"2022-05-04 06:06:12.000000000","reason":"A robot voted negatively on a label"}},"removed_from_attention_set":{},"hashtags":[],"change_id":"If68f06dec85346818f5c08783eecee8592c24684","subject":"sharding: add can_transition_to_cleaved helper method","status":"NEW","created":"2022-05-04 04:59:41.000000000","updated":"2022-05-31 01:39:12.000000000","submit_type":"MERGE_IF_NECESSARY","mergeable":false,"submittable":false,"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"ea1d22f8dc6fb3db8738cb90de69c44e50bcae49","_number":840408,"virtual_id_number":840408,"owner":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"actions":{},"labels":{"Verified":{"disliked":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"tag":"autogenerated:zuul:check","value":-1,"date":"2022-05-31 01:39:12.000000000","permitted_voting_range":{"min":-2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","value":-1,"default_value":0,"optional":true},"Code-Review":{"all":[{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"all":[{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2022-05-04 05:54:08.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"CC"},{"updated":"2022-05-04 06:06:12.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"}],"messages":[{"id":"080fb53516319511bf9ec6d4b88b068c1e4699e1","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"date":"2022-05-04 04:59:41.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"e3401e661679eb084afe298089086511c91dd449","tag":"autogenerated:zuul:check-arm64","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-05-04 05:54:08.000000000","message":"Patch Set 1:\n\nBuild succeeded (ARM64 pipeline).\n\n- swift-tox-py38-arm64 https://zuul.opendev.org/t/openstack/build/825f55f54c6a40a4b8e4ff9ccb04b5f7 : SUCCESS in 37m 41s\n- swift-tox-py39-arm64 https://zuul.opendev.org/t/openstack/build/64d0c1e24ae64cd88fcbca2a39ae385f : SUCCESS in 34m 00s\n- swift-tox-func-encryption-py38-arm64 https://zuul.opendev.org/t/openstack/build/079907154f54401b8c42882f24b50ff6 : SUCCESS in 43m 09s\n- swift-tox-func-py38-arm64 https://zuul.opendev.org/t/openstack/build/fe438744ea674f5f8eeb0146b7605ae6 : SUCCESS in 52m 09s","accounts_in_message":[],"_revision_number":1},{"id":"972809fac6a522ef9e137b1234fb971951801036","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-05-04 06:06:12.000000000","message":"Patch Set 1: Verified-1\n\n(4 comments)\n\nBuild failed (check pipeline).  For information on how to proceed, see\nhttps://docs.opendev.org/opendev/infra-manual/latest/developers.html#automated-testing\n\n\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/5f4285d9643f473ea5f02c175fd562cc : FAILURE in 5m 35s\n- grenade https://zuul.opendev.org/t/openstack/build/45e29be3db894168bfd8ca76983e970f : SUCCESS in 46m 47s\n- tempest-integrated-object-storage https://zuul.opendev.org/t/openstack/build/351d877cba734482a89c1202db9b9a2a : SUCCESS in 1h 02m 11s\n- openstacksdk-functional-devstack https://zuul.opendev.org/t/openstack/build/d7299a8272af45ed864a94a69c81ff35 : SUCCESS in 52m 24s\n- swift-tox-func-py36-centos-8-stream-fips https://zuul.opendev.org/t/openstack/build/208ed96ad0ae4c7d8c951e429f7a6d31 : SUCCESS in 19m 02s (non-voting)\n- swift-tox-func-encryption-py36-centos-8-stream-fips https://zuul.opendev.org/t/openstack/build/537ae496d74e4f53825f1f736965258d : SUCCESS in 21m 11s (non-voting)\n- swift-tox-func-ec-py36-centos-8-stream-fips https://zuul.opendev.org/t/openstack/build/dcd10288c64a4bee921e4d43f9099126 : SUCCESS in 20m 35s (non-voting)\n- swift-build-image https://zuul.opendev.org/t/openstack/build/b45ca68013084669807a1769a07dd71a : SUCCESS in 7m 19s (non-voting)\n- swift-build-image-py3 https://zuul.opendev.org/t/openstack/build/795cfd1ceaed4947b60064ef569517a7 : SUCCESS in 4m 41s (non-voting)\n- swift-tox-py27 https://zuul.opendev.org/t/openstack/build/e6fe17014f6b455393a17c7351c442d0 : SUCCESS in 18m 06s\n- swift-tox-py36 https://zuul.opendev.org/t/openstack/build/b55814cc42634205af3274cbb8dd9c13 : SUCCESS in 15m 54s\n- swift-tox-py39 https://zuul.opendev.org/t/openstack/build/5c45e124c67942c8baec2f2c6a821e54 : SUCCESS in 18m 03s\n- swift-tox-func-py27 https://zuul.opendev.org/t/openstack/build/742870e528d04f21a6d6c6fd3216329b : SUCCESS in 16m 53s\n- swift-tox-func-encryption-py27 https://zuul.opendev.org/t/openstack/build/ad680fb69c2a48a0839c653540cce0db : SUCCESS in 17m 13s\n- swift-tox-func-ec-py27 https://zuul.opendev.org/t/openstack/build/39bc0c0aed6744ab9271a9c75bcf9b03 : SUCCESS in 18m 42s\n- swift-tox-func-py38 https://zuul.opendev.org/t/openstack/build/06c489ced04f4f82ae12ae416bd33f09 : SUCCESS in 16m 42s\n- swift-tox-func-encryption-py38 https://zuul.opendev.org/t/openstack/build/d9202c2486ff43d2b8369a7926952a65 : SUCCESS in 15m 41s\n- swift-tox-func-ec-py38 https://zuul.opendev.org/t/openstack/build/b49be62f1a7a4f54a1002f1b30050f40 : SUCCESS in 16m 05s\n- swift-func-cors https://zuul.opendev.org/t/openstack/build/932e4e0c10e0427ba93b06cc5c53e6e4 : SUCCESS in 6m 16s\n- swift-tox-func-s3api-ceph-s3tests-tempauth https://zuul.opendev.org/t/openstack/build/30755241478f400da523566c53c028d6 : SUCCESS in 15m 15s (non-voting)\n- swift-probetests-centos-7 https://zuul.opendev.org/t/openstack/build/ebd6110ce63c496a88a1edb668b626db : SUCCESS in 52m 16s\n- swift-probetests-centos-8-stream https://zuul.opendev.org/t/openstack/build/feb39f8952b045acb2730d7057f08d08 : SUCCESS in 1h 00m 21s\n- swift-dsvm-functional https://zuul.opendev.org/t/openstack/build/0fc19604cbcb4197a350e0bbeaa8c77d : SUCCESS in 42m 53s\n- swift-dsvm-functional-ipv6 https://zuul.opendev.org/t/openstack/build/83ee7688418f467cae321dc67eb1a7fd : SUCCESS in 42m 50s\n- swift-tox-lower-constraints https://zuul.opendev.org/t/openstack/build/718981b342fa400893eac02325a518a3 : SUCCESS in 16m 13s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/b40699f837b4408cb03c68cd810c8599 : FAILURE in 5m 31s\n- swift-multinode-rolling-upgrade https://zuul.opendev.org/t/openstack/build/2f37a0ddce1b400a97f7998b6ed01cd4 : SUCCESS in 18m 50s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/e3c9fb4a147e45baa53c6b498515623f : SUCCESS in 57m 19s","accounts_in_message":[],"_revision_number":1},{"id":"11a560535522d2f6b328590364a8ab84a5f725b9","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"date":"2022-05-31 00:26:32.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"817593d0251c4de5665637eebe73c6a7dbb19225","tag":"autogenerated:zuul:check-arm64","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-05-31 01:18:34.000000000","message":"Patch Set 2:\n\nBuild failed (ARM64 pipeline).\n\n- swift-tox-py38-arm64 https://zuul.opendev.org/t/openstack/build/be2743205c314af5a999aea575077217 : FAILURE in 49m 47s\n- swift-tox-py39-arm64 https://zuul.opendev.org/t/openstack/build/582eda71ae3c41689b666855214aaa2e : FAILURE in 37m 17s\n- swift-tox-func-encryption-py38-arm64 https://zuul.opendev.org/t/openstack/build/ad5292476a824b0c84c269e15e40e995 : SUCCESS in 46m 31s\n- swift-tox-func-py38-arm64 https://zuul.opendev.org/t/openstack/build/a15ac907c79349e09b14a24375df7c42 : SUCCESS in 48m 59s","accounts_in_message":[],"_revision_number":2},{"id":"ea1d22f8dc6fb3db8738cb90de69c44e50bcae49","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-05-31 01:39:12.000000000","message":"Patch Set 2: Verified-1\n\n(4 comments)\n\nBuild failed (check pipeline).  For information on how to proceed, see\nhttps://docs.opendev.org/opendev/infra-manual/latest/developers.html#automated-testing\n\n\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/bdb3e98dabd64e63a13e62b127b4f19c : FAILURE in 5m 26s\n- grenade https://zuul.opendev.org/t/openstack/build/f64f7472b2e347fd895a0d51a16c280e : SUCCESS in 1h 07m 08s\n- tempest-integrated-object-storage https://zuul.opendev.org/t/openstack/build/64fdb578505842fc81b24bf2574b0727 : SUCCESS in 53m 01s\n- openstacksdk-functional-devstack https://zuul.opendev.org/t/openstack/build/d004e8b5992b47b4a0d14f184c1759d9 : SUCCESS in 54m 35s\n- swift-tox-func-py36-centos-8-stream-fips https://zuul.opendev.org/t/openstack/build/3d2520bae09a433d968c37041b8493a5 : SUCCESS in 18m 50s (non-voting)\n- swift-tox-func-encryption-py36-centos-8-stream-fips https://zuul.opendev.org/t/openstack/build/19cb9051fa6248dfbff7b6c4b3c5d090 : SUCCESS in 18m 44s (non-voting)\n- swift-tox-func-ec-py36-centos-8-stream-fips https://zuul.opendev.org/t/openstack/build/d1b6cc22e7e14c11a172d39a06a2e4ec : SUCCESS in 20m 47s (non-voting)\n- swift-build-image https://zuul.opendev.org/t/openstack/build/18e3cee3ff824e2dad8655e496ca4481 : SUCCESS in 8m 23s (non-voting)\n- swift-build-image-py3 https://zuul.opendev.org/t/openstack/build/727673cd727c4878aeda6507393c8568 : SUCCESS in 5m 21s (non-voting)\n- swift-tox-py27 https://zuul.opendev.org/t/openstack/build/fed65df68cf24867a8fa0a52d80c6336 : FAILURE in 16m 28s\n- swift-tox-py36 https://zuul.opendev.org/t/openstack/build/f2539a30fc734346b777288ce4245800 : FAILURE in 15m 12s\n- swift-tox-py39 https://zuul.opendev.org/t/openstack/build/89478992e0b54239b146863422aacc3a : FAILURE in 15m 58s\n- swift-tox-func-py27 https://zuul.opendev.org/t/openstack/build/953b0e5821c74c8284e5e6542285778f : SUCCESS in 17m 11s\n- swift-tox-func-encryption-py27 https://zuul.opendev.org/t/openstack/build/edc21f2feebd48e1b2b21eb1a593fc1e : SUCCESS in 18m 24s\n- swift-tox-func-ec-py27 https://zuul.opendev.org/t/openstack/build/c087e63cf1e64cf79b1e19ea64ad3979 : SUCCESS in 17m 36s\n- swift-tox-func-py38 https://zuul.opendev.org/t/openstack/build/8ac83d9d24b047fa909cd1d376de4c6a : SUCCESS in 15m 05s\n- swift-tox-func-encryption-py38 https://zuul.opendev.org/t/openstack/build/e0318ad07e5d49d9b265c13495d3e201 : SUCCESS in 12m 47s\n- swift-tox-func-ec-py38 https://zuul.opendev.org/t/openstack/build/6b1045a956574e57b6b1839e5b396012 : SUCCESS in 15m 50s\n- swift-func-cors https://zuul.opendev.org/t/openstack/build/bd7c55d35b4848a39b63c9871f160345 : SUCCESS in 8m 41s\n- swift-tox-func-s3api-ceph-s3tests-tempauth https://zuul.opendev.org/t/openstack/build/e52d8ef665f941c895c0b718d05b9ea2 : SUCCESS in 12m 46s (non-voting)\n- swift-probetests-centos-7 https://zuul.opendev.org/t/openstack/build/02ba98d2acd04129a179f500548d6c74 : SUCCESS in 49m 37s\n- swift-probetests-centos-8-stream https://zuul.opendev.org/t/openstack/build/e8158cb5fbd9467ba743fa620e5e507d : SUCCESS in 47m 05s\n- swift-dsvm-functional https://zuul.opendev.org/t/openstack/build/c46435061d62444fbb3dd3399f559008 : SUCCESS in 40m 16s\n- swift-dsvm-functional-ipv6 https://zuul.opendev.org/t/openstack/build/b14ae9498a9546d39d54d39b95b641ea : SUCCESS in 35m 24s\n- swift-tox-lower-constraints https://zuul.opendev.org/t/openstack/build/d3820abee4b84866bc8e97410c4b32d4 : FAILURE in 16m 29s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/ae5fe8415dd24a67ad06eae689a7ca00 : FAILURE in 6m 19s\n- swift-multinode-rolling-upgrade https://zuul.opendev.org/t/openstack/build/6b98deff247648c8b47fb13e29c53672 : SUCCESS in 19m 30s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/a68a66a15a60498f9af2ba3aeceea96d : SUCCESS in 46m 46s","accounts_in_message":[],"_revision_number":2}],"current_revision_number":2,"current_revision":"5c7731b42eecec136e2b923c2f83ff6b65ac8d72","revisions":{"892a0bf66c4d465861872c95d6971423ca959947":{"kind":"REWORK","_number":1,"created":"2022-05-04 04:59:41.000000000","uploader":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"ref":"refs/changes/08/840408/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/swift","ref":"refs/changes/08/840408/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/swift refs/changes/08/840408/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/swift refs/changes/08/840408/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/swift refs/changes/08/840408/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/swift refs/changes/08/840408/1"}}},"commit":{"parents":[{"commit":"1be971df020fb769d065747b92d268327241c5c8","subject":"Sharding: No stat updates before CLEAVED state","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/swift/commit/1be971df020fb769d065747b92d268327241c5c8"}]}],"author":{"name":"Matthew Oliver","email":"matt@oliver.net.au","date":"2022-05-04 04:51:00.000000000","tz":600},"committer":{"name":"Matthew Oliver","email":"matt@oliver.net.au","date":"2022-05-04 04:51:00.000000000","tz":600},"subject":"sharding: add can_transition_to_cleaved helper method","message":"sharding: add can_transition_to_cleaved helper method\n\nThis patch adds a helper function that given a number of time units will\ncalculate how much of a difference to the expected we are happy to accept\nin order to make progress. This patch adds the helper method, but\ncurrently isn\u0027t used.\n\nThe basic idea is given an expected_size and current_size of the shard,\ncheck to see if we can move to CLEAVED.\nIf the current_size \u003c expected use an exponential formula to see if enough\niterations have passed for us to accept the current size and make progress.\n\nThe simple formula is `base ** iterations`, tuned into a percentage of\nthe expected size that the current_size may have a difference of.\n\nIterations will be a number of time units, so a bigger difference\nis allowed over time. But are in effect what we\u0027re raising the power to.\nWe could make the time unit configurable in seconds. So we could make it\ndaily. So long as we know when we attempted to cleave (but couldn\u0027t\ntransition) we can then take the difference in time / time units and we\nget our iterations number.\n\nAs for the base, the following table might help\n\n  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n  | base | iterations (in %)                | num |\n  -------------------------------------------------\n  | 1.4  | 1, 1.4, 1.96, 2.744, 3.8416,     | 15  |\n  |      | 5.378240, 7.529536, 10.541350,   |     |\n  |      | 14.757891, 20.661047, 28.925465, |     |\n  |      | 40.495652, 56.693912, 79.371477, |     |\n  |      | 111.120068                       |     |\n  | 1.5  | 1, 1.5, 2.25, 3.375, 5.0625,     | 13  |\n  |      | 7.59375, 11.390625, 17.085938,   |     |\n  |      | 25.628906, 38.443359, 57.665039, |     |\n  |      | 86.497559, 129.746338            |     |\n  | 1.6  | 1, 1.6, 2.56, 4.096, 6.5536,     | 11  |\n  |      | 10.48576, 16.777216, 26.843546,  |     |\n  |      | 42.949673, 68.719477,            |     |\n  |      | 109.951163                       |     |\n  | 1.7  | 1, 1.7, 2.89, 4.913, 8.3521,     | 10  |\n  |      | 14.19857, 24.137569, 41.033867,  |     |\n  |      | 69.757574, 118.587876            |     |\n  | 1.8  | 1, 1.8, 3.24, 5.832, 10.4976,    | 9   |\n  |      | 18.89568, 34.012224, 61.222003,  |     |\n  |      | 110.199606                       |     |\n  | 1.9  | 1, 1.9, 3.61, 6.859, 13.0321,    | 9   |\n  |      | 24.76099, 47.045881, 89.387174,  |     |\n  |      | 169.835630                       |     |\n  | 2    | 1, 2, 4, 8, 16, 32, 64, 128 (8)  |     |\n  | e    | 1, 2.718282, 7.389056,           | 6   |\n  |      | 20.085537, 54.59815, 148.413159  |     |\n  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nA simple way to print iterations to check a base is with:\n\n  for x in range(20):\n      print(\"%f, \" % ((base ** x)), end\u003d\u0027\u0027)\n\nChange-Id: If68f06dec85346818f5c08783eecee8592c24684\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/swift/commit/892a0bf66c4d465861872c95d6971423ca959947"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/swift/commit/892a0bf66c4d465861872c95d6971423ca959947"}]},"branch":"refs/heads/master"},"5c7731b42eecec136e2b923c2f83ff6b65ac8d72":{"kind":"REWORK","_number":2,"created":"2022-05-31 00:26:32.000000000","uploader":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"ref":"refs/changes/08/840408/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/swift","ref":"refs/changes/08/840408/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/swift refs/changes/08/840408/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/swift refs/changes/08/840408/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/swift refs/changes/08/840408/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/swift refs/changes/08/840408/2"}}},"commit":{"parents":[{"commit":"09c08d3e8e03ece51b18c9a73fab058984673a32","subject":"WIP: sharding: Block moving to CLEAVED if cleaved rows \u003c expected","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/swift/commit/09c08d3e8e03ece51b18c9a73fab058984673a32"}]}],"author":{"name":"Matthew Oliver","email":"matt@oliver.net.au","date":"2022-05-04 04:51:00.000000000","tz":600},"committer":{"name":"Matthew Oliver","email":"matt@oliver.net.au","date":"2022-05-31 00:25:51.000000000","tz":600},"subject":"sharding: add can_transition_to_cleaved helper method","message":"sharding: add can_transition_to_cleaved helper method\n\nThis patch adds a helper function that given a number of time units will\ncalculate how much of a difference to the expected we are happy to accept\nin order to make progress. This patch adds the helper method, but\ncurrently isn\u0027t used.\n\nThe basic idea is given an expected_size and current_size of the shard,\ncheck to see if we can move to CLEAVED.\nIf the current_size \u003c expected use an exponential formula to see if enough\niterations have passed for us to accept the current size and make progress.\n\nThe simple formula is `base ** iterations`, tuned into a percentage of\nthe expected size that the current_size may have a difference of.\n\nIterations will be a number of time units, so a bigger difference\nis allowed over time. But are in effect what we\u0027re raising the power to.\nWe could make the time unit configurable in seconds. So we could make it\ndaily. So long as we know when we attempted to cleave (but couldn\u0027t\ntransition) we can then take the difference in time / time units and we\nget our iterations number.\n\nAs for the base, the following table might help\n\n  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n  | base | iterations (in %)                | num |\n  -------------------------------------------------\n  | 1.4  | 1, 1.4, 1.96, 2.744, 3.8416,     | 15  |\n  |      | 5.378240, 7.529536, 10.541350,   |     |\n  |      | 14.757891, 20.661047, 28.925465, |     |\n  |      | 40.495652, 56.693912, 79.371477, |     |\n  |      | 111.120068                       |     |\n  | 1.5  | 1, 1.5, 2.25, 3.375, 5.0625,     | 13  |\n  |      | 7.59375, 11.390625, 17.085938,   |     |\n  |      | 25.628906, 38.443359, 57.665039, |     |\n  |      | 86.497559, 129.746338            |     |\n  | 1.6  | 1, 1.6, 2.56, 4.096, 6.5536,     | 11  |\n  |      | 10.48576, 16.777216, 26.843546,  |     |\n  |      | 42.949673, 68.719477,            |     |\n  |      | 109.951163                       |     |\n  | 1.7  | 1, 1.7, 2.89, 4.913, 8.3521,     | 10  |\n  |      | 14.19857, 24.137569, 41.033867,  |     |\n  |      | 69.757574, 118.587876            |     |\n  | 1.8  | 1, 1.8, 3.24, 5.832, 10.4976,    | 9   |\n  |      | 18.89568, 34.012224, 61.222003,  |     |\n  |      | 110.199606                       |     |\n  | 1.9  | 1, 1.9, 3.61, 6.859, 13.0321,    | 9   |\n  |      | 24.76099, 47.045881, 89.387174,  |     |\n  |      | 169.835630                       |     |\n  | 2    | 1, 2, 4, 8, 16, 32, 64, 128 (8)  |     |\n  | e    | 1, 2.718282, 7.389056,           | 6   |\n  |      | 20.085537, 54.59815, 148.413159  |     |\n  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nA simple way to print iterations to check a base is with:\n\n  for x in range(20):\n      print(\"%f, \" % ((base ** x)), end\u003d\u0027\u0027)\n\nChange-Id: If68f06dec85346818f5c08783eecee8592c24684\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/swift/commit/5c7731b42eecec136e2b923c2f83ff6b65ac8d72"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/swift/commit/5c7731b42eecec136e2b923c2f83ff6b65ac8d72"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"OK","labels":[{"label":"Verified","status":"MAY","applied_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"MAY"},{"label":"Workflow","status":"MAY"}]}],"submit_requirements":[{"name":"Verified","description":"Verified in gate by CI","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Verified\u003dMAX AND -label:Verified\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Verified\u003dMAX","label:Verified\u003dMIN"],"atom_explanations":{"label:Verified\u003dMAX":"","label:Verified\u003dMIN":""}}},{"name":"Code-Review","description":"Code reviewed by core reviewer","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Code-Review\u003dMAX AND -label:Code-Review\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Code-Review\u003dMAX","label:Code-Review\u003dMIN"],"atom_explanations":{"label:Code-Review\u003dMAX":"","label:Code-Review\u003dMIN":""}}},{"name":"Workflow","description":"Approved for gate by core reviewer","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Workflow\u003dMAX AND -label:Workflow\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Workflow\u003dMAX","label:Workflow\u003dMIN"],"atom_explanations":{"label:Workflow\u003dMAX":"","label:Workflow\u003dMIN":""}}}]}
