)]}'
{"Engine/swift/storlet_gateway/storlet_docker_gateway.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b999c67d4c72499215784c59821bb2cf55ec9b95","unresolved":false,"context_lines":[{"line_number":570,"context_line":"        return docker_updated"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"# TODO(takashi): Where is it called?"},{"line_number":574,"context_line":"def validate_conf(middleware_conf):"},{"line_number":575,"context_line":"    mandatory \u003d [\u0027storlet_logcontainer\u0027, \u0027lxc_root\u0027, \u0027cache_dir\u0027,"},{"line_number":576,"context_line":"                 \u0027log_dir\u0027, \u0027script_dir\u0027, \u0027storlets_dir\u0027, \u0027pipes_dir\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_77bad6c1","line":573,"updated":"2016-02-22 09:23:35.000000000","message":"Good catch!","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"1913af6428b9cb74a260689d9b50464c884d644f","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def __init__(self, sconf, logger, app, version, account, container,"},{"line_number":118,"context_line":"                 obj):"},{"line_number":119,"context_line":"        self.logger \u003d logger"},{"line_number":120,"context_line":"        self.app \u003d app"},{"line_number":121,"context_line":"        self.version \u003d version"},{"line_number":122,"context_line":"        self.account \u003d account"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_4c6cc736","line":119,"updated":"2016-03-11 08:46:57.000000000","message":"Takashi, can you please add here:\n# TODO(eranr):\n# Add sconf defaults, and get rid of\n# validate_conf below\n\nThanks!","commit_id":"a8359e346fbce313df092f08067b98816f09841e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3d1599f789277b3093db77894a34c1e4adcb09ce","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def __init__(self, sconf, logger, app, version, account, container,"},{"line_number":118,"context_line":"                 obj):"},{"line_number":119,"context_line":"        self.logger \u003d logger"},{"line_number":120,"context_line":"        self.app \u003d app"},{"line_number":121,"context_line":"        self.version \u003d version"},{"line_number":122,"context_line":"        self.account \u003d account"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_173acce7","line":119,"in_reply_to":"5aef4532_4c6cc736","updated":"2016-03-11 09:07:21.000000000","message":"Done","commit_id":"a8359e346fbce313df092f08067b98816f09841e"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"1913af6428b9cb74a260689d9b50464c884d644f","unresolved":false,"context_lines":[{"line_number":640,"context_line":"        return docker_updated"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"# TODO(takashi): Where is it called?"},{"line_number":644,"context_line":"def validate_conf(middleware_conf):"},{"line_number":645,"context_line":"    mandatory \u003d [\u0027storlet_logcontainer\u0027, \u0027lxc_root\u0027, \u0027cache_dir\u0027,"},{"line_number":646,"context_line":"                 \u0027log_dir\u0027, \u0027script_dir\u0027, \u0027storlets_dir\u0027, \u0027pipes_dir\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_6c738316","line":643,"updated":"2016-03-11 08:46:57.000000000","message":"Good point, see request above :-)","commit_id":"a8359e346fbce313df092f08067b98816f09841e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3d1599f789277b3093db77894a34c1e4adcb09ce","unresolved":false,"context_lines":[{"line_number":640,"context_line":"        return docker_updated"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"# TODO(takashi): Where is it called?"},{"line_number":644,"context_line":"def validate_conf(middleware_conf):"},{"line_number":645,"context_line":"    mandatory \u003d [\u0027storlet_logcontainer\u0027, \u0027lxc_root\u0027, \u0027cache_dir\u0027,"},{"line_number":646,"context_line":"                 \u0027log_dir\u0027, \u0027script_dir\u0027, \u0027storlets_dir\u0027, \u0027pipes_dir\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_570bb42b","line":643,"in_reply_to":"5aef4532_6c738316","updated":"2016-03-11 09:07:21.000000000","message":"Done","commit_id":"a8359e346fbce313df092f08067b98816f09841e"}],"Engine/swift/storlet_gateway/storlet_runtime.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b999c67d4c72499215784c59821bb2cf55ec9b95","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def start_storlet_daemon(self, spath, storlet_id):"},{"line_number":298,"context_line":"        \"\"\""},{"line_number":299,"context_line":"        Stard SDaemon process in the account\u0027s sandbox"},{"line_number":300,"context_line":"        \"\"\""},{"line_number":301,"context_line":"        prms \u003d {}"},{"line_number":302,"context_line":"        prms[\u0027daemon_language\u0027] \u003d \u0027java\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_b7ebbeaf","line":299,"updated":"2016-02-22 09:23:35.000000000","message":"Start?","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"ed5ed7122f90c6af1f6ae1c8509ec4f668724a53","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def start_storlet_daemon(self, spath, storlet_id):"},{"line_number":298,"context_line":"        \"\"\""},{"line_number":299,"context_line":"        Stard SDaemon process in the account\u0027s sandbox"},{"line_number":300,"context_line":"        \"\"\""},{"line_number":301,"context_line":"        prms \u003d {}"},{"line_number":302,"context_line":"        prms[\u0027daemon_language\u0027] \u003d \u0027java\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_46809bc0","line":299,"in_reply_to":"bae84128_b7ebbeaf","updated":"2016-02-23 01:29:29.000000000","message":"Done","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b999c67d4c72499215784c59821bb2cf55ec9b95","unresolved":false,"context_lines":[{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        os.read(read_fd, 10)"},{"line_number":504,"context_line":"        os.close(read_fd)"},{"line_number":505,"context_line":"        os.close(write_fd)"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"    def _invoke(self):"},{"line_number":508,"context_line":"        dtg \u003d SBusDatagram()"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_dda6630f","line":505,"updated":"2016-02-22 09:23:35.000000000","message":"I thought that if we got an exception at L501, the fds are never closed but the problem was already addressed at https://review.openstack.org/#/c/282211/","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"ed5ed7122f90c6af1f6ae1c8509ec4f668724a53","unresolved":false,"context_lines":[{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        os.read(read_fd, 10)"},{"line_number":504,"context_line":"        os.close(read_fd)"},{"line_number":505,"context_line":"        os.close(write_fd)"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"    def _invoke(self):"},{"line_number":508,"context_line":"        dtg \u003d SBusDatagram()"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_865d837b","line":505,"in_reply_to":"bae84128_dda6630f","updated":"2016-02-23 01:29:29.000000000","message":"Yes. When writing this patch I found some possible fd leaks, and I\u0027m going to fix them in that patch, using context manager.","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b999c67d4c72499215784c59821bb2cf55ec9b95","unresolved":false,"context_lines":[{"line_number":552,"context_line":"                    self._cancel()"},{"line_number":553,"context_line":"                except StorletException:"},{"line_number":554,"context_line":"                    pass"},{"line_number":555,"context_line":"            raise e"},{"line_number":556,"context_line":"        if fd not in r:"},{"line_number":557,"context_line":"            raise StorletException(\u0027Read fd is not ready\u0027)"},{"line_number":558,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_3a48355b","line":555,"updated":"2016-02-22 09:23:35.000000000","message":"It seems good to use sys.exec_info() to save tracebacks.","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"ed5ed7122f90c6af1f6ae1c8509ec4f668724a53","unresolved":false,"context_lines":[{"line_number":552,"context_line":"                    self._cancel()"},{"line_number":553,"context_line":"                except StorletException:"},{"line_number":554,"context_line":"                    pass"},{"line_number":555,"context_line":"            raise e"},{"line_number":556,"context_line":"        if fd not in r:"},{"line_number":557,"context_line":"            raise StorletException(\u0027Read fd is not ready\u0027)"},{"line_number":558,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_868623d9","line":555,"in_reply_to":"bae84128_3a48355b","updated":"2016-02-23 01:29:29.000000000","message":"Done","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b999c67d4c72499215784c59821bb2cf55ec9b95","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        flat_json \u003d os.read(self.metadata_read_fd, MAX_META_OVERALL_SIZE)"},{"line_number":563,"context_line":"        if flat_json is None:"},{"line_number":564,"context_line":"            return None"},{"line_number":565,"context_line":"        return json.loads(flat_json)"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"class StorletInvocationGETProtocol(StorletInvocationProtocol):"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_dacb09a4","line":565,"updated":"2016-02-22 09:23:35.000000000","message":"Should we need try/except if the read metadata is in invalid json format in further work?","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"ed5ed7122f90c6af1f6ae1c8509ec4f668724a53","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        flat_json \u003d os.read(self.metadata_read_fd, MAX_META_OVERALL_SIZE)"},{"line_number":563,"context_line":"        if flat_json is None:"},{"line_number":564,"context_line":"            return None"},{"line_number":565,"context_line":"        return json.loads(flat_json)"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"class StorletInvocationGETProtocol(StorletInvocationProtocol):"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_46cedb2e","line":565,"in_reply_to":"bae84128_dacb09a4","updated":"2016-02-23 01:29:29.000000000","message":"I added a TODO note about this.","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b999c67d4c72499215784c59821bb2cf55ec9b95","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        with StorletTimeout(self.timeout):"},{"line_number":617,"context_line":"            r, w, e \u003d select.select([], [fd], [])"},{"line_number":618,"context_line":"        if fd not in w:"},{"line_number":619,"context_line":"            raise StorletException(\u0027Write fd is not ready\u0027)"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    def _write_with_timeout(self, writer, chunk):"},{"line_number":622,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_5ac6d948","line":619,"updated":"2016-02-22 09:23:35.000000000","message":"These Exceptions seem to be transferred up to the top of StoletHandler in Storlet middeware. Do we need translation mechanism from StorletExcption into HTTPException somewhere anyways?\n\nIt might be the work past refactoring...","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"ed5ed7122f90c6af1f6ae1c8509ec4f668724a53","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        with StorletTimeout(self.timeout):"},{"line_number":617,"context_line":"            r, w, e \u003d select.select([], [fd], [])"},{"line_number":618,"context_line":"        if fd not in w:"},{"line_number":619,"context_line":"            raise StorletException(\u0027Write fd is not ready\u0027)"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    def _write_with_timeout(self, writer, chunk):"},{"line_number":622,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_46c37bed","line":619,"in_reply_to":"bae84128_5ac6d948","updated":"2016-02-23 01:29:29.000000000","message":"There are something we can do about this, but I\u0027m not sure what is the best way now.\n\nAs the first step I added a new independent except block for StorletException in storlet_hadler. Then we can consider how we improve that handling (move it into lower layer?) in the future work.","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"1913af6428b9cb74a260689d9b50464c884d644f","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                    else:"},{"line_number":257,"context_line":"                        return"},{"line_number":258,"context_line":"        except StorletTimeout:"},{"line_number":259,"context_line":"            self.logger.exception(\"wait for sandbox %s timedout\""},{"line_number":260,"context_line":"                                  % self.account)"},{"line_number":261,"context_line":"            raise"},{"line_number":262,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_4c53276d","line":259,"updated":"2016-03-11 08:46:57.000000000","message":"good refactoring.","commit_id":"a8359e346fbce313df092f08067b98816f09841e"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"1913af6428b9cb74a260689d9b50464c884d644f","unresolved":false,"context_lines":[{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        pipe_path \u003d self.paths.host_factory_pipe()"},{"line_number":311,"context_line":"        rc \u003d SBus.send(pipe_path, dtg)"},{"line_number":312,"context_line":"        # TODO(takashi): Why we should rond rc into -1?"},{"line_number":313,"context_line":"        if (rc \u003c 0):"},{"line_number":314,"context_line":"            return -1"},{"line_number":315,"context_line":"        reply \u003d os.read(read_fd, 10)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_ccc5770b","line":312,"updated":"2016-03-11 08:46:57.000000000","message":"No reason, we can just get rid of this","commit_id":"a8359e346fbce313df092f08067b98816f09841e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3d1599f789277b3093db77894a34c1e4adcb09ce","unresolved":false,"context_lines":[{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        pipe_path \u003d self.paths.host_factory_pipe()"},{"line_number":311,"context_line":"        rc \u003d SBus.send(pipe_path, dtg)"},{"line_number":312,"context_line":"        # TODO(takashi): Why we should rond rc into -1?"},{"line_number":313,"context_line":"        if (rc \u003c 0):"},{"line_number":314,"context_line":"            return -1"},{"line_number":315,"context_line":"        reply \u003d os.read(read_fd, 10)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_3750a85e","line":312,"in_reply_to":"5aef4532_ccc5770b","updated":"2016-03-11 09:07:21.000000000","message":"I\u0027ll check handling about return code in another patch, so I leave this one in this patch.","commit_id":"a8359e346fbce313df092f08067b98816f09841e"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"1913af6428b9cb74a260689d9b50464c884d644f","unresolved":false,"context_lines":[{"line_number":538,"context_line":"        if not os.path.exists(storlet_logger_path):"},{"line_number":539,"context_line":"            os.makedirs(storlet_logger_path)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"    def _wait_for_read_with_timeout(self, fd):"},{"line_number":542,"context_line":"        \"\"\""},{"line_number":543,"context_line":"        Wait while the read file descriptor gets ready"},{"line_number":544,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_2cacdb34","line":541,"updated":"2016-03-11 08:46:57.000000000","message":"Really good code improvement. Thanks","commit_id":"a8359e346fbce313df092f08067b98816f09841e"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"1913af6428b9cb74a260689d9b50464c884d644f","unresolved":false,"context_lines":[{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    def _read_metadata(self):"},{"line_number":574,"context_line":"        self._wait_for_read_with_timeout(self.metadata_read_fd)"},{"line_number":575,"context_line":"        # TODO(takashi): Should we add timeout here?"},{"line_number":576,"context_line":"        flat_json \u003d os.read(self.metadata_read_fd, MAX_META_OVERALL_SIZE)"},{"line_number":577,"context_line":"        if flat_json is None:"},{"line_number":578,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_17080c28","line":575,"updated":"2016-03-11 08:46:57.000000000","message":"I am not sure. I guess that if we waited for the read input we probably do not need another timeout. I would leave it as is for now.","commit_id":"a8359e346fbce313df092f08067b98816f09841e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3d1599f789277b3093db77894a34c1e4adcb09ce","unresolved":false,"context_lines":[{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    def _read_metadata(self):"},{"line_number":574,"context_line":"        self._wait_for_read_with_timeout(self.metadata_read_fd)"},{"line_number":575,"context_line":"        # TODO(takashi): Should we add timeout here?"},{"line_number":576,"context_line":"        flat_json \u003d os.read(self.metadata_read_fd, MAX_META_OVERALL_SIZE)"},{"line_number":577,"context_line":"        if flat_json is None:"},{"line_number":578,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_37f42886","line":575,"in_reply_to":"5aef4532_17080c28","updated":"2016-03-11 09:07:21.000000000","message":"Done","commit_id":"a8359e346fbce313df092f08067b98816f09841e"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"1913af6428b9cb74a260689d9b50464c884d644f","unresolved":false,"context_lines":[{"line_number":626,"context_line":"                                                    self.input_data_read_fd)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def _wait_for_write_with_timeout(self, fd):"},{"line_number":629,"context_line":"        with StorletTimeout(self.timeout):"},{"line_number":630,"context_line":"            r, w, e \u003d select.select([], [fd], [])"},{"line_number":631,"context_line":"        if fd not in w:"},{"line_number":632,"context_line":"            raise StorletException(\u0027Write fd is not ready\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_77199079","line":629,"updated":"2016-03-11 08:46:57.000000000","message":"Do we want the same refactoring as with _wait_for_read_with_timeout?","commit_id":"a8359e346fbce313df092f08067b98816f09841e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3d1599f789277b3093db77894a34c1e4adcb09ce","unresolved":false,"context_lines":[{"line_number":626,"context_line":"                                                    self.input_data_read_fd)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def _wait_for_write_with_timeout(self, fd):"},{"line_number":629,"context_line":"        with StorletTimeout(self.timeout):"},{"line_number":630,"context_line":"            r, w, e \u003d select.select([], [fd], [])"},{"line_number":631,"context_line":"        if fd not in w:"},{"line_number":632,"context_line":"            raise StorletException(\u0027Write fd is not ready\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_9776dc04","line":629,"in_reply_to":"5aef4532_77199079","updated":"2016-03-11 09:07:21.000000000","message":"I think no. The main change in read method is about canceling, and here we don\u0027t have to do canceling.","commit_id":"a8359e346fbce313df092f08067b98816f09841e"}],"Engine/swift/storlet_middleware/storlet_common.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"93945b05f11d4e2a4e331319fd019e7bd4241c40","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from eventlet import Timeout"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class StorletTimeout(Timeout):"},{"line_number":26,"context_line":"    pass"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_d2906498","line":25,"updated":"2016-02-15 02:45:42.000000000","message":"This inheritance looks pretty good. That means StorletTimeout is a kind of Timeout class. nice.","commit_id":"a2276da1bdb69da97c3a5288e569dce044893ee9"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b999c67d4c72499215784c59821bb2cf55ec9b95","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"# TODO(takashi): Move the following modules under storlet_gateway"},{"line_number":26,"context_line":"class StorletTimeout(Timeout):"},{"line_number":27,"context_line":"    pass"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class StorletException(Exception):"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_bdf71ff4","line":27,"updated":"2016-02-22 09:23:35.000000000","message":"It might be good to inherit 2 parents, i.e. StorletTimeout(Timeout, StorletException), not sure though.","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"ed5ed7122f90c6af1f6ae1c8509ec4f668724a53","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"# TODO(takashi): Move the following modules under storlet_gateway"},{"line_number":26,"context_line":"class StorletTimeout(Timeout):"},{"line_number":27,"context_line":"    pass"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class StorletException(Exception):"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_06a69352","line":27,"in_reply_to":"bae84128_bdf71ff4","updated":"2016-02-23 01:29:29.000000000","message":"Done\n\nGood idea!","commit_id":"ee80937345eb73fe2eb16d4ad07b297c79cbf957"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"1913af6428b9cb74a260689d9b50464c884d644f","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# TODO(takashi): Move the following modules under storlet_gateway"},{"line_number":21,"context_line":"class StorletException(Exception):"},{"line_number":22,"context_line":"    pass"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_7747d04b","line":21,"updated":"2016-03-11 08:46:57.000000000","message":"Can we pls rename this to StorletRuntimeException?\nI do not want to confuse this with the Java StorletException.","commit_id":"a8359e346fbce313df092f08067b98816f09841e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3d1599f789277b3093db77894a34c1e4adcb09ce","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# TODO(takashi): Move the following modules under storlet_gateway"},{"line_number":21,"context_line":"class StorletException(Exception):"},{"line_number":22,"context_line":"    pass"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_97925cf5","line":21,"in_reply_to":"5aef4532_7747d04b","updated":"2016-03-11 09:07:21.000000000","message":"Done","commit_id":"a8359e346fbce313df092f08067b98816f09841e"}],"Engine/swift/storlet_middleware/storlet_handler.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"93945b05f11d4e2a4e331319fd019e7bd4241c40","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        try:"},{"line_number":369,"context_line":"            return request_handler.handle_request()"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        except Timeout:"},{"line_number":372,"context_line":"            self.logger.exception(\u0027Storlet execution timed out\u0027)"},{"line_number":373,"context_line":"            raise HTTPInternalServerError(body\u003d\u0027Storlet execution timed out\u0027)"},{"line_number":374,"context_line":"        except HTTPException:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_125e4ce9","line":371,"updated":"2016-02-15 02:45:42.000000000","message":"However, I don\u0027t like to round the all Exceptions into Timeout.\n\nI\u0027m not sure but the all exceptions seem to come from different reasons. For example, intuitively StorletsTimeout will occur when the Storlets thread in the container halted during execution. On the other hand, ConnectionTimeout/Timeout will occur the reason depends on something like network (TCP? HTTP? or Swift data transfer?)\n\nOr, it might be good this handling should be in handler.handle_request?\n\nThought?","commit_id":"a2276da1bdb69da97c3a5288e569dce044893ee9"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"e3909facc11ba6f120620553bf746c6f7b33d101","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        try:"},{"line_number":369,"context_line":"            return request_handler.handle_request()"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        except Timeout:"},{"line_number":372,"context_line":"            self.logger.exception(\u0027Storlet execution timed out\u0027)"},{"line_number":373,"context_line":"            raise HTTPInternalServerError(body\u003d\u0027Storlet execution timed out\u0027)"},{"line_number":374,"context_line":"        except HTTPException:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_99541322","line":371,"in_reply_to":"dae33548_125e4ce9","updated":"2016-02-16 01:18:12.000000000","message":"If we do the same handling as we do now, I prefer rounding them, because it can shows clearly the policy for \"timeout\"s.\n\nHowever, there may be some chance for improvement about handling. I\u0027m going to consider adding some more handling according to the type of Timeout here or in lower layer.\n\nAs least, now StorletTimeout is not used at all (I didn\u0027t notice it before :-( ), and I should do something.\n\nNice call, thanks!","commit_id":"a2276da1bdb69da97c3a5288e569dce044893ee9"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"c40bbe7a1ac6ec5bb126b1fd3f3c96dfb56c741b","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        try:"},{"line_number":369,"context_line":"            return request_handler.handle_request()"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        except Timeout:"},{"line_number":372,"context_line":"            self.logger.exception(\u0027Storlet execution timed out\u0027)"},{"line_number":373,"context_line":"            raise HTTPInternalServerError(body\u003d\u0027Storlet execution timed out\u0027)"},{"line_number":374,"context_line":"        except HTTPException:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_bcabc51c","line":371,"in_reply_to":"dae33548_99541322","updated":"2016-02-16 02:10:26.000000000","message":"Done","commit_id":"a2276da1bdb69da97c3a5288e569dce044893ee9"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"1913af6428b9cb74a260689d9b50464c884d644f","unresolved":false,"context_lines":[{"line_number":511,"context_line":"        try:"},{"line_number":512,"context_line":"            return request_handler.handle_request()"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        # TODO(takashi): Consider handling them in lower layers"},{"line_number":515,"context_line":"        except StorletTimeout:"},{"line_number":516,"context_line":"            self.logger.exception(\u0027Storlet execution timed out\u0027)"},{"line_number":517,"context_line":"            raise HTTPInternalServerError(body\u003d\u0027Storlet execution timed out\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_57ae14e8","line":514,"updated":"2016-03-11 08:46:57.000000000","message":"I tend to agree, specifically w.r.t. StorletTimeout\nOtherwise, good refactoring","commit_id":"a8359e346fbce313df092f08067b98816f09841e"}]}
