)]}'
{"horizon/static/horizon/js/horizon.tables.js":[{"author":{"_account_id":6650,"name":"Eric Peterson","email":"ejpetey@gmail.com","username":"ericpeterson-l"},"change_message_id":"98bec982dc5a60c3a4789c33fc6f800023367061","unresolved":false,"context_lines":[{"line_number":3,"context_line":"horizon.datatables \u003d {"},{"line_number":4,"context_line":"  update: function () {"},{"line_number":5,"context_line":"    var $rows_to_update \u003d"},{"line_number":6,"context_line":"            $(\u0027tr.status_unknown.ajax-update, tr.ajax-update:has(\u003e td.status_unknown)\u0027),"},{"line_number":7,"context_line":"      rows_to_update \u003d $rows_to_update.length;"},{"line_number":8,"context_line":"    if ( rows_to_update \u003e 0 ) {"},{"line_number":9,"context_line":"      var interval \u003d $rows_to_update.attr(\u0027data-update-interval\u0027),"}],"source_content_type":"text/javascript","patch_set":1,"id":"1aca2d91_bd7f3faa","line":6,"range":{"start_line":6,"start_character":18,"end_line":6,"end_character":32},"updated":"2015-05-08 21:26:05.000000000","message":"this could have a wide ranging impact on many tables.  I know the bug is originally for instances page, but all the other pages where status_unknown is now used will have constant ajax polling.  This could be problematic/overkill in some situations.","commit_id":"3fd7c823dc11841ab1379fdb5f780169c29f3a39"},{"author":{"_account_id":14078,"name":"Alan Fung","email":"alan@alanfung.com","username":"alanfung"},"change_message_id":"35a0947b0aa7591421ac414fe39333e35fb22883","unresolved":false,"context_lines":[{"line_number":3,"context_line":"horizon.datatables \u003d {"},{"line_number":4,"context_line":"  update: function () {"},{"line_number":5,"context_line":"    var $rows_to_update \u003d"},{"line_number":6,"context_line":"            $(\u0027tr.status_unknown.ajax-update, tr.ajax-update:has(\u003e td.status_unknown)\u0027),"},{"line_number":7,"context_line":"      rows_to_update \u003d $rows_to_update.length;"},{"line_number":8,"context_line":"    if ( rows_to_update \u003e 0 ) {"},{"line_number":9,"context_line":"      var interval \u003d $rows_to_update.attr(\u0027data-update-interval\u0027),"}],"source_content_type":"text/javascript","patch_set":1,"id":"1aca2d91_cfd92024","line":6,"in_reply_to":"1aca2d91_bd7f3faa","updated":"2015-05-08 23:36:37.000000000","message":"@Eric, I agree, I have the same concern too, hope to start a discussion on this. I think it\u0027s unlikely to be a major issue.\n\nConsider the situation where this is an issue:\n\nThis scenario is only possible when one of the tds is status_down and another one is status_unknown. Otherwise, any td.status_unknown would cause the row to be tr.status_unknown to begin with.\n(reference: horizon/tables/base.py DataTable.calculate_row_status)\n\nIt is likely that this td.status_unknown would eventually resolve to a status_up/status_down, otherwise they shouldn\u0027t be marked status_unknown to begin with. If the status resolves, then this is non-issue.\n\nHowever, suppose status_unknown never resolves (maybe has to do with status_down on the other td), then this would cause a constant polling. In this case I believe the current logic would decay the interval to once every 30 seconds. Worst case: N requests every 30s if there are N rows in this state.\n\nEven with consideration of other non-instance tables, this is very unlikely and worst case scenario is not terrible. The value of this change outweighs cons for our specific deployment (YMMV).\n\n--\n\nWith that said, I would like to get more input on this. We can write a more elaborated and more defensive logic (in comparison to this more simple fix).","commit_id":"3fd7c823dc11841ab1379fdb5f780169c29f3a39"}]}
