Re: advisability of closing long-running ZEO connection
Jim Fulton <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <CAPDm-FispKbVv+FUOVTt8hGZiEcKE6=KnOxp9p76uZJGCtktig@mail.gmail.com> |
I assume/hope that your subject is erroneous. I assume you're referring to ZODB connections, not ZEO connections. On Wed, Nov 9, 2016 at 3:56 PM, Boylan, Ross <[email protected]> wrote: > My application sets up a lot of objects and the does a commit, with ZEO > providing the backend. > It then runs a lot of computations in threads, each of which updates the > data at the start and the end of the computation. > Do these computations use the database data while the computations are underway? > > My application's main thread does nothing during this time except launch > new threads, and all the information it needs is in the objects as of the > first commit. > > Is it safe to close the connection in the main thread during this time? > My concern is that some of the objects I need may dematerialize if I do so > (or perhaps might have been dematerialized while the connection was open). > You should **never** hold on to objects from closed connections. > I suppose I could add transaction boundaries before each thread launches > to avoid letting the transaction boundary from the main thread get too old, > but that seems like a lot of updating when none of the updates are material > to what the main thread does. > I can't interpret this, as I don't know what problem it is trying to solve. Jim -- Jim Fulton http://jimfulton.info -- You received this message because you are subscribed to the Google Groups "zodb" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.