)]}'
{"glance/db/sqlalchemy/alembic_migrations/versions/wallaby_expand02_add_staging_staging_host_to_image_locations.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"fac254a61f8b719836bab8ec490b43ec8c4bc6c9","unresolved":true,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def upgrade():"},{"line_number":32,"context_line":"    staging_col \u003d Column(\u0027staging\u0027, Boolean, nullable\u003dTrue, default\u003dFalse)"},{"line_number":33,"context_line":"    staging_host_col \u003d Column(\u0027staging_host\u0027,"},{"line_number":34,"context_line":"                              String(length\u003d253),"},{"line_number":35,"context_line":"                              nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"76603587_756937c1","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":74},"updated":"2021-03-01 04:40:28.000000000","message":"Not seeing any benefits for this specific column","commit_id":"f71f4d4b9232adb8be3313afea35712c921b7cee"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c7a79765c91118f222ff582656f9e4b2da68666f","unresolved":true,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def upgrade():"},{"line_number":32,"context_line":"    staging_col \u003d Column(\u0027staging\u0027, Boolean, nullable\u003dTrue, default\u003dFalse)"},{"line_number":33,"context_line":"    staging_host_col \u003d Column(\u0027staging_host\u0027,"},{"line_number":34,"context_line":"                              String(length\u003d253),"},{"line_number":35,"context_line":"                              nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"a07fda3b_5449f6c2","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":74},"in_reply_to":"041d3c1e_9c3f7fe2","updated":"2021-03-01 16:38:00.000000000","message":"But it doesn\u0027t seem like you\u0027re really using it? Or at least not consistently.\n\nHaving a boolean and the host URL also gives us the potential for them to get out of sync somehow. If you can use the URL as a boolean, why would you not want to have one source of truth instead of two?","commit_id":"f71f4d4b9232adb8be3313afea35712c921b7cee"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"47ddb36ad16550df916734968fe929c5952e878d","unresolved":true,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def upgrade():"},{"line_number":32,"context_line":"    staging_col \u003d Column(\u0027staging\u0027, Boolean, nullable\u003dTrue, default\u003dFalse)"},{"line_number":33,"context_line":"    staging_host_col \u003d Column(\u0027staging_host\u0027,"},{"line_number":34,"context_line":"                              String(length\u003d253),"},{"line_number":35,"context_line":"                              nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ce883349_375ac6b8","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":74},"in_reply_to":"76603587_756937c1","updated":"2021-03-01 07:49:40.000000000","message":"Makes lots of he logic cleaner and easy to flag the staing location without exposing the staging_host details. Specially as we do not have hard requirement to have anything meaningful to put into the staging_host. Just made the life in general easier with next to no cost.","commit_id":"f71f4d4b9232adb8be3313afea35712c921b7cee"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bf2cca0e6b5e4e1546330ba7f5c1393ec1da12d1","unresolved":true,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def upgrade():"},{"line_number":32,"context_line":"    staging_col \u003d Column(\u0027staging\u0027, Boolean, nullable\u003dTrue, default\u003dFalse)"},{"line_number":33,"context_line":"    staging_host_col \u003d Column(\u0027staging_host\u0027,"},{"line_number":34,"context_line":"                              String(length\u003d253),"},{"line_number":35,"context_line":"                              nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ec53242d_c4078564","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":74},"in_reply_to":"ce883349_375ac6b8","updated":"2021-03-01 14:31:47.000000000","message":"I don\u0027t understand how it can make things easier, especially when staging_host is nullable. Using it as a boolean should already work, so I\u0027m not sure why we need this.","commit_id":"f71f4d4b9232adb8be3313afea35712c921b7cee"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"2cc9fbe581f1ad7d5b7e84023203f0eeaf72ccf3","unresolved":true,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def upgrade():"},{"line_number":32,"context_line":"    staging_col \u003d Column(\u0027staging\u0027, Boolean, nullable\u003dTrue, default\u003dFalse)"},{"line_number":33,"context_line":"    staging_host_col \u003d Column(\u0027staging_host\u0027,"},{"line_number":34,"context_line":"                              String(length\u003d253),"},{"line_number":35,"context_line":"                              nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"041d3c1e_9c3f7fe2","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":74},"in_reply_to":"ec53242d_c4078564","updated":"2021-03-01 15:16:55.000000000","message":"Like I discussed with Abhishek, for the cost of 1 bit we simplify the logic a lot (specially _if_ we decide not wanting to utilize the \"not_set\" for the cases where we would be setting it null.) We would need to implement this as pseudo parameter of the location at the API level (and test all possible corner cases of it) while now we can just remove the staging_host and still flag the location being staging directly from the data model and lock it with schema.","commit_id":"f71f4d4b9232adb8be3313afea35712c921b7cee"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bf2cca0e6b5e4e1546330ba7f5c1393ec1da12d1","unresolved":true,"context_lines":[{"line_number":32,"context_line":"    staging_col \u003d Column(\u0027staging\u0027, Boolean, nullable\u003dTrue, default\u003dFalse)"},{"line_number":33,"context_line":"    staging_host_col \u003d Column(\u0027staging_host\u0027,"},{"line_number":34,"context_line":"                              String(length\u003d253),"},{"line_number":35,"context_line":"                              nullable\u003dTrue)"},{"line_number":36,"context_line":"    op.add_column(\u0027image_locations\u0027, staging_col)"},{"line_number":37,"context_line":"    op.add_column(\u0027image_locations\u0027, staging_host_col)"},{"line_number":38,"context_line":"    op.create_index(\u0027ix_image_locations_staging_host\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"4f75fd5f_cfc057ae","line":35,"updated":"2021-03-01 14:31:47.000000000","message":"As I argued in the spec, I do not understand why it makes sense to reserve space in the database for the life of an image, for a piece of information we only need (a) if we\u0027re doing import for that image and (b) for a short period of time in the overall scheme of things. This is multiplied by not only all the images in the DB, but by all the locations on those images. The \"benefit\" of using location metadata was that we already have to reserve that space anyway (although granted it brought a lot of problems on its own).","commit_id":"f71f4d4b9232adb8be3313afea35712c921b7cee"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"2cc9fbe581f1ad7d5b7e84023203f0eeaf72ccf3","unresolved":true,"context_lines":[{"line_number":32,"context_line":"    staging_col \u003d Column(\u0027staging\u0027, Boolean, nullable\u003dTrue, default\u003dFalse)"},{"line_number":33,"context_line":"    staging_host_col \u003d Column(\u0027staging_host\u0027,"},{"line_number":34,"context_line":"                              String(length\u003d253),"},{"line_number":35,"context_line":"                              nullable\u003dTrue)"},{"line_number":36,"context_line":"    op.add_column(\u0027image_locations\u0027, staging_col)"},{"line_number":37,"context_line":"    op.add_column(\u0027image_locations\u0027, staging_host_col)"},{"line_number":38,"context_line":"    op.create_index(\u0027ix_image_locations_staging_host\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"975dcdcb_d2d81bc0","line":35,"in_reply_to":"4f75fd5f_cfc057ae","updated":"2021-03-01 15:16:55.000000000","message":"IIUC Null + Null is still Null and False + Null is 1 bit. So I don\u0027t think it\u0027s exactly a massive increase in our data model to have these 2 columns here.","commit_id":"f71f4d4b9232adb8be3313afea35712c921b7cee"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c7a79765c91118f222ff582656f9e4b2da68666f","unresolved":true,"context_lines":[{"line_number":32,"context_line":"    staging_col \u003d Column(\u0027staging\u0027, Boolean, nullable\u003dTrue, default\u003dFalse)"},{"line_number":33,"context_line":"    staging_host_col \u003d Column(\u0027staging_host\u0027,"},{"line_number":34,"context_line":"                              String(length\u003d253),"},{"line_number":35,"context_line":"                              nullable\u003dTrue)"},{"line_number":36,"context_line":"    op.add_column(\u0027image_locations\u0027, staging_col)"},{"line_number":37,"context_line":"    op.add_column(\u0027image_locations\u0027, staging_host_col)"},{"line_number":38,"context_line":"    op.create_index(\u0027ix_image_locations_staging_host\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"cea89bc2_06edd8e0","line":35,"in_reply_to":"975dcdcb_d2d81bc0","updated":"2021-03-01 16:38:00.000000000","message":"Clearly, nobody is going to run out of disk space because of the waste here, that\u0027s for sure. However, everything we have here in our data model is both long-term cognitive load on the developers and reviewers in terms of making sure it\u0027s properly used and handled, but also machine load in terms of the work we do both in SQL and in python to address these columns when we read and write to this table. It\u0027s potentially operator/upgrade load, in that we have to expand their database now (which is measurable) or later if we change this mechanism, we have to transition their schema, potentially migrate data, etc. For something that will be completely empty at all times of steady state, it\u0027s 100% waste to continually load, handle, compare, and save that field for all image (locations). All that stuff builds up over time, contributing to the already high CPU load, memory footprint, and upgrade time of a lot of openstack projects. Cleaning it up requires a large number of small tweaks.","commit_id":"f71f4d4b9232adb8be3313afea35712c921b7cee"}]}
