[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [pytorctl/master] Add a little more rambling to reset_all().



commit dc1cb9ce39fd5c9c5ea50f542642130a44e71fee
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date:   Fri Jun 24 12:33:02 2011 -0700

    Add a little more rambling to reset_all().
---
 SQLSupport.py |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/SQLSupport.py b/SQLSupport.py
index cf2c753..1e2971b 100644
--- a/SQLSupport.py
+++ b/SQLSupport.py
@@ -658,8 +658,12 @@ class RouterStats(Entity):
 #################### Model Support ################
 def reset_all():
   plog("WARN", "SQLSupport.reset_all() called. See SQLSupport.py for details")
-  # Need to keep routers around.. 
-  # WARNING!
+  # XXX: We still have a memory leak somewhere in here
+  # Current suspects are sqlite, python-sqlite, or sqlalchemy misuse...
+  # http://stackoverflow.com/questions/5552932/sqlalchemy-misuse-causing-memory-leak
+  # The bandwidth scanners switched to a parent/child model because of this.
+
+  # XXX: WARNING!
   # Must keep the routers around because circ_status_event may
   # reference old Routers that are no longer in consensus
   # and will raise an ObjectDeletedError. See function circ_status_event in
@@ -677,12 +681,13 @@ def reset_all():
   tc_session.commit()
   tc_session.expunge_all()
 
-  # WARNING!
+  # XXX: WARNING!
   # May not clear relation all tables! (SQLAlchemy or Elixir bug)
   # Try: 
   # tc_session.execute('delete from router_streams__stream;')
 
-  # WARNING!
+
+  # XXX: WARNING!
   # This will cause Postgres databases to hang
   # on DROP TABLE. Possibly an issue with cascade.
   # Sqlite works though.

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits