)]}'
{"zuul/driver/github/githubconnection.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"b2a27d06d6d860a4cb9740fb9b8238f48d95d65e","unresolved":false,"context_lines":[{"line_number":678,"context_line":"            try:"},{"line_number":679,"context_line":"                self.event_queue.election.run(self._dispatchEventsMain)"},{"line_number":680,"context_line":"            except Exception:"},{"line_number":681,"context_line":"                self.log.exception(\"Exception handling GitHub event:\")"},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"    def _dispatchEventsMain(self):"},{"line_number":684,"context_line":"        while True:"}],"source_content_type":"text/x-python","patch_set":1,"id":"0b53c22b_9834711d","line":681,"updated":"2021-03-30 23:28:14.000000000","message":"Agreed.","commit_id":"aea1933682ad43aa65394bd2c94232d4fdf07556"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"6434edc8ea7421a06dec4bd4c925d5f64790fe63","unresolved":true,"context_lines":[{"line_number":678,"context_line":"            try:"},{"line_number":679,"context_line":"                self.event_queue.election.run(self._dispatchEventsMain)"},{"line_number":680,"context_line":"            except Exception:"},{"line_number":681,"context_line":"                self.log.exception(\"Exception handling GitHub event:\")"},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"    def _dispatchEventsMain(self):"},{"line_number":684,"context_line":"        while True:"}],"source_content_type":"text/x-python","patch_set":1,"id":"08a99b42_883a162c","line":681,"updated":"2021-03-30 08:38:22.000000000","message":"If _dispatchEventsMain() raises an exception we probably want to cancel/remove futures in _event_forward_queue so we don\u0027t try to ack those later, as they might haven been processed by a different scheduler in the meantime.","commit_id":"aea1933682ad43aa65394bd2c94232d4fdf07556"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"dc9ec1570f44e07854d32c3f84c66d2751502bcd","unresolved":true,"context_lines":[{"line_number":717,"context_line":"        # concurrent executor for pre-processing."},{"line_number":718,"context_line":"        for event in self.event_queue:"},{"line_number":719,"context_line":"            if self._stopped:"},{"line_number":720,"context_line":"                break"},{"line_number":721,"context_line":"            if event.ack_ref in self._events_in_progress:"},{"line_number":722,"context_line":"                continue"},{"line_number":723,"context_line":"            etuple \u003d self._eventAsTuple(event)"}],"source_content_type":"text/x-python","patch_set":2,"id":"af045aee_e2c47f18","line":720,"updated":"2021-04-08 20:31:48.000000000","message":"Is self.event_queue stored in zk? If not then I think we would drop any events that have arrived to this scheduler without sending them off for preprocessing. If This scheduler is stopped to force another to take over we would experience in a gap in events.","commit_id":"9af4e075322971a5d0d29775afac376c8a5579ff"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"b07e0ced890477e4a9f6d015094bd4fe45b37887","unresolved":false,"context_lines":[{"line_number":717,"context_line":"        # concurrent executor for pre-processing."},{"line_number":718,"context_line":"        for event in self.event_queue:"},{"line_number":719,"context_line":"            if self._stopped:"},{"line_number":720,"context_line":"                break"},{"line_number":721,"context_line":"            if event.ack_ref in self._events_in_progress:"},{"line_number":722,"context_line":"                continue"},{"line_number":723,"context_line":"            etuple \u003d self._eventAsTuple(event)"}],"source_content_type":"text/x-python","patch_set":2,"id":"c6e20e5c_9435d948","line":720,"updated":"2021-04-08 20:40:12.000000000","message":"It is stored in ZK!  So the idea is that we can stop here at any time, and even though this returned an event, it\u0027s still in ZK and unack\u0027d.  So the next processor can take over.\n\nWe\u0027re responsible for finishing processing any events we previously handled, which is why the method above continues running the second half of the process even after we\u0027ve stopped the first (to drain our second queue).\n\nOnly when everything is drained do we exit.  If it takes a while to drain the second half of our queue, we may pause processing for a while, but we won\u0027t lose events.\n\nI marked the initializer of self.event_queue below.","commit_id":"9af4e075322971a5d0d29775afac376c8a5579ff"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"d63aadc5ea08ade37b93df7381a880f4ff0bcd83","unresolved":false,"context_lines":[{"line_number":717,"context_line":"        # concurrent executor for pre-processing."},{"line_number":718,"context_line":"        for event in self.event_queue:"},{"line_number":719,"context_line":"            if self._stopped:"},{"line_number":720,"context_line":"                break"},{"line_number":721,"context_line":"            if event.ack_ref in self._events_in_progress:"},{"line_number":722,"context_line":"                continue"},{"line_number":723,"context_line":"            etuple \u003d self._eventAsTuple(event)"}],"source_content_type":"text/x-python","patch_set":2,"id":"054c95ea_a1330e0b","line":720,"updated":"2021-04-08 20:41:59.000000000","message":"Oh, I should add if we\u0027re forcibly terminated, obviously we can\u0027t drain our second queue, but in that case the original events are still un-ack\u0027d, so again, they\u0027ll be processed by the next owner.","commit_id":"9af4e075322971a5d0d29775afac376c8a5579ff"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"b07e0ced890477e4a9f6d015094bd4fe45b37887","unresolved":false,"context_lines":[{"line_number":1203,"context_line":"        self.log.debug(\u0027Creating Zookeeper event queue\u0027)"},{"line_number":1204,"context_line":"        self.event_queue \u003d ConnectionEventQueue("},{"line_number":1205,"context_line":"            self.sched.zk_client, self.connection_name"},{"line_number":1206,"context_line":"        )"},{"line_number":1207,"context_line":"        self.log.info(\u0027Starting event connector\u0027)"},{"line_number":1208,"context_line":"        self._start_event_connector()"},{"line_number":1209,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"884d2f2e_d801674c","line":1206,"updated":"2021-04-08 20:40:12.000000000","message":"I believe this is the first event queue.","commit_id":"9af4e075322971a5d0d29775afac376c8a5579ff"}]}
