)]}'
{"gnocchi/indexer/sqlalchemy.py":[{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"75ce55eebd7a9312eb96e9f33279bbacfb4fbcc8","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.conf \u003d conf"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def connect(self):"},{"line_number":72,"context_line":"        self.engine_facade \u003d session.EngineFacade.from_config(self.conf)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def disconnect(self):"},{"line_number":75,"context_line":"        self.engine_facade.get_engine().dispose()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_82503e60","side":"PARENT","line":72,"updated":"2015-07-23 20:30:05.000000000","message":"ok, you have your own CONF here that I think is not the global CONF, you\u0027re setting conf.indexer.url up there.  So....  you have to tell enginefacade about that.  unfortunately the pattern here where it is per-indexer is totally different from every other OS app I looked at, so to maintain this I\u0027d need to come up with a different pattern for you.","commit_id":"66ed43887dd5cdd40e80a7e25aaf86b2f2645a30"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"f5161d2b61d8ffb988e2d90c179f379db2c00340","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.conf \u003d conf"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def connect(self):"},{"line_number":72,"context_line":"        self.engine_facade \u003d session.EngineFacade.from_config(self.conf)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def disconnect(self):"},{"line_number":75,"context_line":"        self.engine_facade.get_engine().dispose()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_6bae2de9","side":"PARENT","line":72,"in_reply_to":"3a50d1a3_82503e60","updated":"2015-07-23 21:25:48.000000000","message":"Yup, we are moving away in Ceilometer/Aodh too on this global conf pattern that is terrible and actually not really recommended. :(","commit_id":"66ed43887dd5cdd40e80a7e25aaf86b2f2645a30"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e8bf3407d375e5ad9de5c3ef583eb29895c8e671","unresolved":false,"context_lines":[{"line_number":64,"context_line":"class Context(threading.local):"},{"line_number":65,"context_line":"    pass"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"context \u003d Context()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class PerInstanceFacade(_enginefacade._TransactionContextManager):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_158211c9","line":67,"updated":"2015-07-24 08:44:53.000000000","message":"is this really used somewhere?","commit_id":"ce7957662498cee3e05ef3bcd2edd815f20fa01a"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"726c7851014b8197c85939fbc1a68a5ff99fac44","unresolved":false,"context_lines":[{"line_number":64,"context_line":"class Context(threading.local):"},{"line_number":65,"context_line":"    pass"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"context \u003d Context()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class PerInstanceFacade(_enginefacade._TransactionContextManager):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_76302908","line":67,"in_reply_to":"3a50d1a3_158211c9","updated":"2015-07-24 15:28:51.000000000","message":"it\u0027s used in every operation.  that\u0027s your context.","commit_id":"ce7957662498cee3e05ef3bcd2edd815f20fa01a"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"6dc0153414f31ef3e1913d685e7aebf7dc01335e","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        # TODO(mbayer): add get_engine() to enginefacade"},{"line_number":95,"context_line":"        if not self.trans._factory._started:"},{"line_number":96,"context_line":"            self.trans._factory._start()"},{"line_number":97,"context_line":"        return self.trans._factory._writer_engine"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def dispose(self):"},{"line_number":100,"context_line":"        # TODO(mbayer): add dispose() to enginefacade"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_ff830e01","line":97,"updated":"2016-01-11 18:29:54.000000000","message":"what\u0027s the diff between this and writer_connection? it seems previous get_engine commands either switch to this or writer_connection.","commit_id":"fc5fe5d87b5ce6f498928fe6af6eeb2fb2f1a1d6"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"ff9be8e852081db6beb03670034958aed0db163a","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        # TODO(mbayer): add get_engine() to enginefacade"},{"line_number":95,"context_line":"        if not self.trans._factory._started:"},{"line_number":96,"context_line":"            self.trans._factory._start()"},{"line_number":97,"context_line":"        return self.trans._factory._writer_engine"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def dispose(self):"},{"line_number":100,"context_line":"        # TODO(mbayer): add dispose() to enginefacade"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_7658a08a","line":97,"in_reply_to":"fa69d971_ff830e01","updated":"2016-01-11 21:49:56.000000000","message":"the engine is just a factory for new connections.  writer_connection ensures that a transactional context is set up, procures a connection from the engine if one isn\u0027t already present, and returns it.   get_engine() is for backwards compatibility with the legacy get_engine() approach of LegacyEngineFacade more or less.","commit_id":"fc5fe5d87b5ce6f498928fe6af6eeb2fb2f1a1d6"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"6dc0153414f31ef3e1913d685e7aebf7dc01335e","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    def list_archive_policies(self):"},{"line_number":155,"context_line":"        with self.facade.independent_reader() as session:"},{"line_number":156,"context_line":"            aps \u003d list(session.query(ArchivePolicy).all())"},{"line_number":157,"context_line":"            session.expunge_all()"},{"line_number":158,"context_line":"            return aps"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_archive_policy(self, name):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_1fb702d9","line":157,"updated":"2016-01-11 18:29:54.000000000","message":"is this not done when leaving context manager? it should call close() (which calls expunge_all?)","commit_id":"fc5fe5d87b5ce6f498928fe6af6eeb2fb2f1a1d6"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"ff9be8e852081db6beb03670034958aed0db163a","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    def list_archive_policies(self):"},{"line_number":155,"context_line":"        with self.facade.independent_reader() as session:"},{"line_number":156,"context_line":"            aps \u003d list(session.query(ArchivePolicy).all())"},{"line_number":157,"context_line":"            session.expunge_all()"},{"line_number":158,"context_line":"            return aps"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_archive_policy(self, name):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_f64c90c9","line":157,"in_reply_to":"fa69d971_1fb702d9","updated":"2016-01-11 21:49:56.000000000","message":"agree, since this is independent_reader(), the Session should be independent here.","commit_id":"fc5fe5d87b5ce6f498928fe6af6eeb2fb2f1a1d6"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"6227ed68e20d325f0eb85a8fe1741cfb318561b6","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    def list_archive_policies(self):"},{"line_number":155,"context_line":"        with self.facade.independent_reader() as session:"},{"line_number":156,"context_line":"            aps \u003d list(session.query(ArchivePolicy).all())"},{"line_number":157,"context_line":"            session.expunge_all()"},{"line_number":158,"context_line":"            return aps"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_archive_policy(self, name):"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_a4b67b3b","line":157,"in_reply_to":"fa69d971_f64c90c9","updated":"2016-01-12 15:10:49.000000000","message":"Done","commit_id":"fc5fe5d87b5ce6f498928fe6af6eeb2fb2f1a1d6"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"6dc0153414f31ef3e1913d685e7aebf7dc01335e","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            return ap"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def delete_archive_policy(self, name):"},{"line_number":167,"context_line":"        with self.facade.writer() as session:"},{"line_number":168,"context_line":"            try:"},{"line_number":169,"context_line":"                if session.query(ArchivePolicy).filter("},{"line_number":170,"context_line":"                        ArchivePolicy.name \u003d\u003d name).delete() \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_7f1abec7","line":167,"updated":"2016-01-11 18:29:54.000000000","message":"curious, why is this not independent but all the other deletes are independent?","commit_id":"fc5fe5d87b5ce6f498928fe6af6eeb2fb2f1a1d6"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"6227ed68e20d325f0eb85a8fe1741cfb318561b6","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            return ap"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def delete_archive_policy(self, name):"},{"line_number":167,"context_line":"        with self.facade.writer() as session:"},{"line_number":168,"context_line":"            try:"},{"line_number":169,"context_line":"                if session.query(ArchivePolicy).filter("},{"line_number":170,"context_line":"                        ArchivePolicy.name \u003d\u003d name).delete() \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_a4175bec","line":167,"in_reply_to":"fa69d971_76cf4029","updated":"2016-01-12 15:10:49.000000000","message":"Done","commit_id":"fc5fe5d87b5ce6f498928fe6af6eeb2fb2f1a1d6"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"ff9be8e852081db6beb03670034958aed0db163a","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            return ap"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def delete_archive_policy(self, name):"},{"line_number":167,"context_line":"        with self.facade.writer() as session:"},{"line_number":168,"context_line":"            try:"},{"line_number":169,"context_line":"                if session.query(ArchivePolicy).filter("},{"line_number":170,"context_line":"                        ArchivePolicy.name \u003d\u003d name).delete() \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_76cf4029","line":167,"in_reply_to":"fa69d971_7f1abec7","updated":"2016-01-11 21:49:56.000000000","message":"ideally independent_reader() should be used as little as possible; there should just be one big transaction for all methods in an API call.  this code seemed to have a lot of weird quirks that relied upon loading things fresh last I worked with it (which was months ago).","commit_id":"fc5fe5d87b5ce6f498928fe6af6eeb2fb2f1a1d6"}]}
