Re: [Firebird-net-provider] ClearAllPools and opened connections
Well, because we don't have a strong agreement how it should behave AND nobody even cared until today :D, I'll leave it as is. We can always revisit this later. -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] ClearAllPools and opened connections
How I'm thinking. The connections are normally in pool, when you're using some, it's not in pool (actually it's still in the pool's collection, but marked as used) logically. When you're cleaning all pools you are cleaning connections that are pooled (in pool). Hence connections not in pool should be untouched. At least that's what I think. On the other hand, this a huge breaking change. Not sure it's worth changing it. :\ Also thinking from the other hand. If you have reference to some connection that's used and you'd like to close and clear all, why not to first close connections you're holding and then clean pools. Right? What's to reason to have method that would do it under your hands... -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] ClearAllPools and opened connections
On Thu, 25 Apr 2013 10:16:33 +0200, Jiri Cincura disk...@cincura.net wrote: How I'm thinking. The connections are normally in pool, when you're using some, it's not in pool (actually it's still in the pool's collection, but marked as used) logically. When you're cleaning all pools you are cleaning connections that are pooled (in pool). Hence connections not in pool should be untouched. At least that's what I think. On the other hand, this a huge breaking change. Not sure it's worth changing it. :\ Also thinking from the other hand. If you have reference to some connection that's used and you'd like to close and clear all, why not to first close connections you're holding and then clean pools. Right? What's to reason to have method that would do it under your hands... You could also see it from a different point: some part of your code is misbehaving (ie not releasing connections back to the pool in a timely fashion), being able to force all connections from the pool to close might be a great way to detect (or mitigate) this problem. Mark -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] ClearAllPools and opened connections
why not to first close connections you're holding and then clean pools. Right? Right 100%, from my point of view. If - at any time during my application is executed - I don't have the information about which connections I have instantiated and which of them are probable open, then in any case I'd have a design flaw in my programming. Let's assume I don't have this specific flaw, then all I need is *one* method, could be static, to mark all open connections, decide whether to close them or not (maybe some asynchronous operation is at work...) and then to remove all closed connections from the pool. best regards, André Knappstein -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] ClearAllPools and opened connections
On Thu, Apr 25, 2013 at 10:27 AM, Mark Rotteveel m...@lawinegevaar.nl wrote: You could also see it from a different point: some part of your code is misbehaving (ie not releasing connections back to the pool in a timely Interesting. I would say why your code isn't going to be fixed in first place? And should the library offer tools for this in first place? fashion), being able to force all connections from the pool to close might be a great way to detect (or mitigate) this problem. Maybe it's wrongly stuck in my head. But I don't see these connection logically in pool (at that time). That's what steers me from it. -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] ClearAllPools and opened connections
On Thu, 25 Apr 2013 10:46:55 +0200, Jiri Cincura disk...@cincura.net wrote: On Thu, Apr 25, 2013 at 10:27 AM, Mark Rotteveel m...@lawinegevaar.nl wrote: You could also see it from a different point: some part of your code is misbehaving (ie not releasing connections back to the pool in a timely Interesting. I would say why your code isn't going to be fixed in first place? And should the library offer tools for this in first place? Maybe I am thinking too much from the Java concept of DataSources and connection pools. There the connection pools (at least in application servers) are - usually - not maintained by a single application, but by the application server and applications are configured to access the datasource by its name and request a connection. Connections requested from the pool are still 'owned' by the connection pool and the connection pool can decide to forcefully revoke a connection from a misbehaving 'client' (or a 'client' which takes too long to complete a piece of work). Also if the administrator recycles/clears the connection pool this means that all connections from the pool (including those currently checked out) can/will be closed. fashion), being able to force all connections from the pool to close might be a great way to detect (or mitigate) this problem. Maybe it's wrongly stuck in my head. But I don't see these connection logically in pool (at that time). That's what steers me from it. They may not be available in the pool, but to me they are still owned by the connection pool. Mark -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] ClearAllPools and opened connections
You could also see it from a different point: some part of your code is misbehaving (ie not releasing connections back to the pool in a timely Interesting. I would say why your code isn't going to be fixed in first place? And should the library offer tools for this in first place? If you don't have the handle of the faulty connection (i.e., it might be part of a third party library) then you won't be able to nuke it. But that's a corner use case. I'd rather have some helpers to identify *where* the connections and/or transaction have been opened. Coincidentally, right now I'm trying to fix a bug in our code regarding zombies opened connections and whatever you add to API that help us find these would be great. Regards, Hernán Martínez-Foffani -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
[Firebird-net-provider] ClearAllPools and opened connections
Hi *, I just found behavior that surprised me. Suppose pooling is on and (all connections to same database): Open connection1. Open connection2. Close connection2. FbConnection.ClearAllPools(); Try to use connection1. On this ^ line you'll get exception as the connection1 was also cleared aka closed/disposed. I always used ClearAllPools with all connections closed so I had no idea it behaves like that. But do you think is correct? Should the ClearAllPools clear even the opened connections? -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] ClearAllPools and opened connections
ClearAllPools should not close/dispose open connections. A function to close all pooled connections might be useful however for when you need to close all connections maybe with different name like CloseAllPooledConnections On Wed, Apr 17, 2013 at 10:29 AM, Jiri Cincura disk...@cincura.net wrote: Hi *, I just found behavior that surprised me. Suppose pooling is on and (all connections to same database): Open connection1. Open connection2. Close connection2. FbConnection.ClearAllPools(); Try to use connection1. On this ^ line you'll get exception as the connection1 was also cleared aka closed/disposed. I always used ClearAllPools with all connections closed so I had no idea it behaves like that. But do you think is correct? Should the ClearAllPools clear even the opened connections? -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider -- Gerdus van Zyl http://about.me/gerdus -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] ClearAllPools and opened connections
On Wed, 17 Apr 2013 10:29:57 +0200, Jiri Cincura disk...@cincura.net wrote: Hi *, I just found behavior that surprised me. Suppose pooling is on and (all connections to same database): Open connection1. Open connection2. Close connection2. FbConnection.ClearAllPools(); Try to use connection1. On this ^ line you'll get exception as the connection1 was also cleared aka closed/disposed. I always used ClearAllPools with all connections closed so I had no idea it behaves like that. But do you think is correct? Should the ClearAllPools clear even the opened connections? This behavior matches with my expectations for a method called ClearAllPools(). Maybe you should keep the existing behavior and add a method 'ClearAllPools(bool closeOpenConnections)' which allows explicit control over this behavior. Mark -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] ClearAllPools and opened connections
On this ^ line you'll get exception as the connection1 was also cleared aka closed/disposed. I always used ClearAllPools with all connections closed so I had no idea it behaves like that. Interesting, I also never noticed. But do you think is correct? Should the ClearAllPools clear even the opened connections? No, it definitely should not. It would destroy a great part of the logic at least in *my* code :-) Forthose connections which are not opened implicitely but explicitely, I usually check once if their status is OK and then do a series of commands. With what you found out it would be possible that some asynchronous thread would clear the pools in between, right? Like cutting the branch you sit on in a big tree... no, really, I'd prefer if this would not be possible :-) -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider mit freundlichen Grüßen, André Knappstein EDV und Controlling ~~ beta Eigenheim- und Grundstücksverwertungsgesellschaft mbH Hafenweg 4 59192 Bergkamen-Rünthe Telefon: +49 2389 9240 140 Telefax: +49 2389 9240 150 e-mail: knappst...@beta-eigenheim.de Amtsgericht Hamm Nr. B 420 Geschäftsführer: Achim Krähling, Dirk Salewski und Matthias Steinhaus USt-IDNr.: DE 125215402 -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider