john-bodley commented on code in PR #25031: URL: https://github.com/apache/superset/pull/25031#discussion_r1300547123
########## superset/tags/models.py: ########## @@ -179,8 +179,8 @@ def after_insert( tag_id=tag.id, object_id=target.id, object_type=cls.object_type ) session.add(tagged_object) - session.commit() + session.close() Review Comment: The various SQLAlchemy hooks, `after_insert`, `after_delete`, etc. pass in the connection from which we instantiate a new session which was never closed. I'm not entirely sure why we're not using the Flask-SQLAlchemy session here (and not committing) to ensure the DAO et al. logic is captured in a single transaction. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org