)]}'
{"neutron/plugins/ml2/drivers/helpers.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2ef0319a69865fd3bc9fa4b839dd9a01fc61575d","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                return"},{"line_number":133,"context_line":"            rand_id_idx \u003d (random.randint(0, IDPOOL_SELECT_SIZE - 1) %"},{"line_number":134,"context_line":"                           len(allocs))"},{"line_number":135,"context_line":"            alloc \u003d allocs[rand_id_idx]"},{"line_number":136,"context_line":"            raw_segment \u003d dict((k, alloc[k]) for k in self.primary_keys)"},{"line_number":137,"context_line":"            LOG.debug(\"%(type)s segment allocate from pool \""},{"line_number":138,"context_line":"                      \"started with %(segment)s \","}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_cc3523f8","line":135,"updated":"2015-05-14 01:03:10.000000000","message":"you can use directly:\n\n  alloc \u003d random.choice(allocs)","commit_id":"8e5cbe39e436265336d1fb55039be5076b01360d"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"84895a391027de4fe2a978100ffba64d6e6209ce","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                return"},{"line_number":133,"context_line":"            rand_id_idx \u003d (random.randint(0, IDPOOL_SELECT_SIZE - 1) %"},{"line_number":134,"context_line":"                           len(allocs))"},{"line_number":135,"context_line":"            alloc \u003d allocs[rand_id_idx]"},{"line_number":136,"context_line":"            raw_segment \u003d dict((k, alloc[k]) for k in self.primary_keys)"},{"line_number":137,"context_line":"            LOG.debug(\"%(type)s segment allocate from pool \""},{"line_number":138,"context_line":"                      \"started with %(segment)s \","}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_0f8d6d7b","line":135,"in_reply_to":"7a016987_cc3523f8","updated":"2015-05-14 01:10:24.000000000","message":"good, thanks","commit_id":"8e5cbe39e436265336d1fb55039be5076b01360d"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"dd862ad0fda91ec52120ee56e9235a9de6dc9c1e","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"IDPOOL_SELECT_SIZE \u003d 100"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class BaseTypeDriver(api.TypeDriver):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_15efbeb1","line":29,"updated":"2015-05-14 03:16:55.000000000","message":"how did you choose this value?","commit_id":"1d9fd2aec00cb85034e5a23cc1beac33c74e0110"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ce4e48b7d97f6789ba3d6ef6f9266a234c15f0a0","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"IDPOOL_SELECT_SIZE \u003d 100"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class BaseTypeDriver(api.TypeDriver):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_61062d22","line":29,"in_reply_to":"7a016987_15efbeb1","updated":"2015-05-14 09:10:22.000000000","message":"listing 50 or 100 items looks good to me.","commit_id":"1d9fd2aec00cb85034e5a23cc1beac33c74e0110"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"b3f729dcf2dc754fc03f808586e283265d357f22","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                      filter_by(allocated\u003dFalse, **filters))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"            # Selected segment can be allocated before update by someone else,"},{"line_number":128,"context_line":"            allocs \u003d select.limit(IDPOOL_SELECT_SIZE).all()"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"            if not allocs:"},{"line_number":131,"context_line":"                # No resource available"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_6f7741d5","line":128,"updated":"2015-05-14 01:44:06.000000000","message":"Interesting, I guess we allocate these  segments in the db a head of time? I\u0027m query why this method doesn\u0027t look more like: _generate_ip() in db/db_base_plugin_v2.py","commit_id":"1d9fd2aec00cb85034e5a23cc1beac33c74e0110"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"e909c3355b20101dbd29f64a6e2871e02e24736b","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                      filter_by(allocated\u003dFalse, **filters))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"            # Selected segment can be allocated before update by someone else,"},{"line_number":128,"context_line":"            allocs \u003d select.limit(IDPOOL_SELECT_SIZE).all()"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"            if not allocs:"},{"line_number":131,"context_line":"                # No resource available"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_da03950c","line":128,"in_reply_to":"7a016987_6f7741d5","updated":"2015-05-14 01:49:34.000000000","message":"\u003e I guess we allocate these segments in the db a head of time?\n\nNot sure what exactly do mean here. Rows are prepopulated, we only change \u0027allocated\u0027 attribute to True.\n\nLong time ago the solution was to get rid of with_lockmode (e.g. db locking) and switch to CAS-like solution.\nThat has it\u0027s own difficulties though.","commit_id":"1d9fd2aec00cb85034e5a23cc1beac33c74e0110"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"1c16cfb0a7da85ecf294a615ed22ca5e00467e72","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                      filter_by(allocated\u003dFalse, **filters))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"            # Selected segment can be allocated before update by someone else,"},{"line_number":128,"context_line":"            allocs \u003d select.limit(IDPOOL_SELECT_SIZE).all()"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"            if not allocs:"},{"line_number":131,"context_line":"                # No resource available"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_109589e3","line":128,"in_reply_to":"7a016987_ba6d79ce","updated":"2015-05-14 07:08:10.000000000","message":"gotcha, this seems like a good optimization then.","commit_id":"1d9fd2aec00cb85034e5a23cc1beac33c74e0110"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8bc2b8b24eeec8f9ab7faa6f7e60291353bf3712","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                      filter_by(allocated\u003dFalse, **filters))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"            # Selected segment can be allocated before update by someone else,"},{"line_number":128,"context_line":"            allocs \u003d select.limit(IDPOOL_SELECT_SIZE).all()"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"            if not allocs:"},{"line_number":131,"context_line":"                # No resource available"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_ba6d79ce","line":128,"in_reply_to":"7a016987_da03950c","updated":"2015-05-14 01:55:14.000000000","message":"indeed, removing lockmode implies to change the allocation logic","commit_id":"1d9fd2aec00cb85034e5a23cc1beac33c74e0110"}]}
