Hey, 2010/11/12 E L <[email protected]>: > Hello > > When I hit a stale object exception, the code can not continue from > that using the try/catch structure shown in attached file. > However, if I rearrange the code so the dbo::ptr stays in scope after > the exception is hit, then I can do a reread() on the dbo::ptr and the > code can then do more reads. > Using: wt 3.1.6 > > Is that the expected behavior? If a dbo::ptr falls out of scope, why > does that not also clean up sync issue?
The problem is that since the object is dirty, going out of scope does not actually purge the in-memory version. Consider the scenario where you modify several objects in a transaction and then finally commit them. You would not expect that only those objects that still are in-scope are saved. I believe that the missing piece here is a "Session::rereadAll()" method which discards all modified objects, as a catch-all solution to a StaleObjectException ? Regards, koen ------------------------------------------------------------------------------ Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
