Jürgen Kartnaller | 2 Oct 2009 20:56
Favicon

Performance Problems using List and Pickle properties

After a long time having problems with performance going down in our Zope/Storm applications I could now figure out where it is coming from. In my latest app using tornado and Storm I have the same problem.

When using List or Pickle properties (both are derived from MutableValueVariable) I found that any time a property is read a flush event hook is added but never removed. The longer the app runs the more hooks are registered which result in low perfomance in store.flush.
The flush event hook is unhooked on the 'stop-tracking-changes' event which is only emited if an object is removed from the database.

--
Jürgen Kartnaller, senior developer

Lovely Systems AG
Telefon +43 5572 908060, Fax +43 5572 908060-77
Schmelzhütterstraße 26a, 6850 Dornbirn, Austria

<div><p>After a long time having problems with performance going down in our Zope/Storm applications I could now figure out where it is coming from. In my latest app using tornado and Storm I have the same problem.<br><br>When using <span class="gI">List or Pickle properties (both are derived from MutableValueVariable) I found that any time a property is read a flush event hook is added but never removed. The longer the app runs the more hooks are registered</span> which result in low perfomance in store.flush.<br>
The flush event hook is unhooked on the 'stop-tracking-changes' event which is only emited if an object is removed from the database.<br><br>-- <br>J&uuml;rgen Kartnaller, senior developer<br><br>Lovely Systems AG<br>Telefon +43 5572 908060, Fax +43 5572 908060-77<br>
Schmelzh&uuml;tterstra&szlig;e 26a, 6850 Dornbirn, Austria<br><br></p></div>
Jamu Kakar | 2 Oct 2009 22:16
Picon
Gravatar

Re: Performance Problems using List and Pickle properties

Hi Jürgen,

On Fri, Oct 2, 2009 at 11:56 AM, Jürgen Kartnaller
<kartnaller <at> lovelysystems.com> wrote:
> After a long time having problems with performance going down in our
> Zope/Storm applications I could now figure out where it is coming from. In
> my latest app using tornado and Storm I have the same problem.
>
> When using List or Pickle properties (both are derived from
> MutableValueVariable) I found that any time a property is read a flush event
> hook is added but never removed. The longer the app runs the more hooks are
> registered which result in low perfomance in store.flush.
> The flush event hook is unhooked on the 'stop-tracking-changes' event which
> is only emited if an object is removed from the database.

Are you using the latest version of Storm?  I remember a problem
like this being fixed some time ago.  I think this is the fix for
the problem I'm thinking of:

revno: 275 [merge]
committer: Thomas Hervé <thomas <at> canonical.com>
branch nick: trunk
timestamp: Mon 2008-11-03 20:38:06 +0100
message:
  Merge variable-referenceset-leak [r=niemeyer,jkakar]

  Change the way MutableValueVariable hooks up to the store event system, by
  overriding get and set. This works around a leak discovered when using
  PickleVariable in a ReferenceSet.

Thanks,
J.

--

-- 
storm mailing list
storm <at> lists.canonical.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/storm
Jürgen Kartnaller | 3 Oct 2009 13:59
Favicon

Re: Performance Problems using List and Pickle properties

The problem exists in 0.14 and 0.15

I tried to reproduce the problem with a simple example without success :(

Jürgen

On Fri, Oct 2, 2009 at 10:16 PM, Jamu Kakar <jkakar-kvr/BIsI4Rg@public.gmane.org> wrote:
Hi Jürgen,

On Fri, Oct 2, 2009 at 11:56 AM, Jürgen Kartnaller
<kartnaller <at> lovelysystems.com> wrote:
> After a long time having problems with performance going down in our
> Zope/Storm applications I could now figure out where it is coming from. In
> my latest app using tornado and Storm I have the same problem.
>
> When using List or Pickle properties (both are derived from
> MutableValueVariable) I found that any time a property is read a flush event
> hook is added but never removed. The longer the app runs the more hooks are
> registered which result in low perfomance in store.flush.
> The flush event hook is unhooked on the 'stop-tracking-changes' event which
> is only emited if an object is removed from the database.

Are you using the latest version of Storm?  I remember a problem
like this being fixed some time ago.  I think this is the fix for
the problem I'm thinking of:

revno: 275 [merge]
committer: Thomas Hervé <thomas <at> canonical.com>
branch nick: trunk
timestamp: Mon 2008-11-03 20:38:06 +0100
message:
 Merge variable-referenceset-leak [r=niemeyer,jkakar]

 Change the way MutableValueVariable hooks up to the store event system, by
 overriding get and set. This works around a leak discovered when using
 PickleVariable in a ReferenceSet.

Thanks,
J.



--
Jürgen Kartnaller, senior developer

Lovely Systems AG
Telefon +43 5572 908060, Fax +43 5572 908060-77
Schmelzhütterstraße 26a, 6850 Dornbirn, Austria

Sitz: Dornbirn, FB: Landesgericht Feldkirch, FN: 208859x, UID: ATU51736705
Aufsichtsratsvorsitzender: Christian Lutz
Vorstand: Manfred Schwendinger
<div>
<p>The problem exists in 0.14 and 0.15<br><br>I tried to reproduce the problem with a simple example without success :(<br><br>J&uuml;rgen<br><br></p>
<div class="gmail_quote">On Fri, Oct 2, 2009 at 10:16 PM, Jamu Kakar <span dir="ltr">&lt;<a href="mailto:jkakar@...">jkakar@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">Hi J&uuml;rgen,<br><div class="im">
<br>
On Fri, Oct 2, 2009 at 11:56 AM, J&uuml;rgen Kartnaller<br>
&lt;<a href="mailto:kartnaller@...">kartnaller <at> lovelysystems.com</a>&gt; wrote:<br>
&gt; After a long time having problems with performance going down in our<br>
&gt; Zope/Storm applications I could now figure out where it is coming from. In<br>
&gt; my latest app using tornado and Storm I have the same problem.<br>
&gt;<br>
&gt; When using List or Pickle properties (both are derived from<br>
&gt; MutableValueVariable) I found that any time a property is read a flush event<br>
&gt; hook is added but never removed. The longer the app runs the more hooks are<br>
&gt; registered which result in low perfomance in store.flush.<br>
&gt; The flush event hook is unhooked on the 'stop-tracking-changes' event which<br>
&gt; is only emited if an object is removed from the database.<br><br>
</div>Are you using the latest version of Storm? &nbsp;I remember a problem<br>
like this being fixed some time ago. &nbsp;I think this is the fix for<br>
the problem I'm thinking of:<br><br>
revno: 275 [merge]<br>
committer: Thomas Herv&eacute; &lt;<a href="mailto:thomas@...">thomas <at> canonical.com</a>&gt;<br>
branch nick: trunk<br>
timestamp: Mon 2008-11-03 20:38:06 +0100<br>
message:<br>
 &nbsp;Merge variable-referenceset-leak [r=niemeyer,jkakar]<br><br>
 &nbsp;Change the way MutableValueVariable hooks up to the store event system, by<br>
 &nbsp;overriding get and set. This works around a leak discovered when using<br>
 &nbsp;PickleVariable in a ReferenceSet.<br><br>
Thanks,<br>J.<br>
</blockquote>
</div>
<br><br clear="all"><br>-- <br>J&uuml;rgen Kartnaller, senior developer<br><br>Lovely Systems AG<br>Telefon +43 5572 908060, Fax +43 5572 908060-77<br>Schmelzh&uuml;tterstra&szlig;e 26a, 6850 Dornbirn, Austria<br><br>Sitz: Dornbirn, FB: Landesgericht Feldkirch, FN: 208859x, UID: ATU51736705<br>Aufsichtsratsvorsitzender: Christian Lutz<br>Vorstand: Manfred Schwendinger<br>
</div>
Jürgen Kartnaller | 3 Oct 2009 15:05
Favicon

Re: Performance Problems using List and Pickle properties

So here is the code to reproduce the problem :

from storm.base import Storm
from storm import properties
from storm.database import create_database
from storm.store import Store
from storm.variables import MutableValueVariable

class WithList(Storm):
    __storm_table__ = 'withlist'

    def __init__(self, key):
        self.key = key

    key = properties.Int(primary = True)

    v = properties.Int()
    l = properties.List(
                    type=properties.Unicode(),
                    default_factory=list
                   )

detectCount = 0

def performanceTest():
    global detectCount

    # patch to see how often _detect_changes is called
    original_detect_changes = MutableValueVariable._detect_changes
    def patch_detect_changes(self, obj_info):
        global detectCount
        detectCount += 1
        original_detect_changes(self, obj_info)
    MutableValueVariable._detect_changes = patch_detect_changes

    database = create_database('use a database supporting lists')
    store = Store(database)
    try:
        store.execute("DROP TABLE withlist;")
    except :
        store.rollback()
    store.execute("""
          CREATE TABLE withlist(
           key int primary key,
           v int,
           l text[]
          );
          """)

    n = store.add(WithList(1))
    del n
    store.commit()

    for i in range(10):
        n = store.get(WithList, 1)
        # access the list
        n.l
        # remove strong reference so the object is removed from the _alive
        # WeakValueDictionary in the store
        del n
        store.commit()
        print 'detect calls =', detectCount
        detectCount = 0

The output will be :

detect calls = 3
detect calls = 4
detect calls = 6
detect calls = 8
detect calls = 10
detect calls = 12
detect calls = 14
detect calls = 16
detect calls = 18
detect calls = 20

Jürgen


On Sat, Oct 3, 2009 at 1:59 PM, Jürgen Kartnaller <kartnaller-H84adUgip2a/3pe1ocb+swC/G2K4zDHf@public.gmane.org> wrote:
The problem exists in 0.14 and 0.15

I tried to reproduce the problem with a simple example without success :(

Jürgen


On Fri, Oct 2, 2009 at 10:16 PM, Jamu Kakar <jkakar-kvr/BIsI4Rg@public.gmane.org> wrote:
Hi Jürgen,

On Fri, Oct 2, 2009 at 11:56 AM, Jürgen Kartnaller
<kartnaller-H84adUgip2a/3pe1ocb+swC/G2K4zDHf@public.gmane.org> wrote:
> After a long time having problems with performance going down in our
> Zope/Storm applications I could now figure out where it is coming from. In
> my latest app using tornado and Storm I have the same problem.
>
> When using List or Pickle properties (both are derived from
> MutableValueVariable) I found that any time a property is read a flush event
> hook is added but never removed. The longer the app runs the more hooks are
> registered which result in low perfomance in store.flush.
> The flush event hook is unhooked on the 'stop-tracking-changes' event which
> is only emited if an object is removed from the database.

Are you using the latest version of Storm?  I remember a problem
like this being fixed some time ago.  I think this is the fix for
the problem I'm thinking of:

revno: 275 [merge]
committer: Thomas Hervé <thomas-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
branch nick: trunk
timestamp: Mon 2008-11-03 20:38:06 +0100
message:
 Merge variable-referenceset-leak [r=niemeyer,jkakar]

 Change the way MutableValueVariable hooks up to the store event system, by
 overriding get and set. This works around a leak discovered when using
 PickleVariable in a ReferenceSet.

Thanks,
J.



--
Jürgen Kartnaller, senior developer

Lovely Systems AG
Telefon +43 5572 908060, Fax +43 5572 908060-77
Schmelzhütterstraße 26a, 6850 Dornbirn, Austria

Sitz: Dornbirn, FB: Landesgericht Feldkirch, FN: 208859x, UID: ATU51736705
Aufsichtsratsvorsitzender: Christian Lutz
Vorstand: Manfred Schwendinger



--
Jürgen Kartnaller, senior developer

Lovely Systems AG
Telefon +43 5572 908060, Fax +43 5572 908060-77
Schmelzhütterstraße 26a, 6850 Dornbirn, Austria

Sitz: Dornbirn, FB: Landesgericht Feldkirch, FN: 208859x, UID: ATU51736705
Aufsichtsratsvorsitzender: Christian Lutz
Vorstand: Manfred Schwendinger
<div>
<p>So here is the code to reproduce the problem :<br><br><span>from storm.base import Storm</span><br><span>from storm import properties</span><br><span>from storm.database import create_database</span><br><span>from storm.store import Store</span><br><span>from storm.variables import MutableValueVariable</span><br><br><span>class WithList(Storm):</span><br><span>&nbsp;&nbsp;&nbsp; __storm_table__ = 'withlist'</span><br><br><span>&nbsp;&nbsp;&nbsp; def __init__(self, key):</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.key = key</span><br><br><span>&nbsp;&nbsp;&nbsp; key = properties.Int(primary = True)</span><br><br><span>&nbsp;&nbsp;&nbsp; v = properties.Int()</span><br><span>&nbsp;&nbsp;&nbsp; l = properties.List(</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=properties.Unicode(),</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default_factory=list</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )</span><br><br><span>detectCount = 0</span><br><br><span>def performanceTest():</span><br><span>&nbsp;&nbsp;&nbsp; global detectCount</span><br><br><span>&nbsp;&nbsp;&nbsp; # patch to see how often _detect_changes is called</span><br><span>&nbsp;&nbsp;&nbsp; original_detect_changes = MutableValueVariable._detect_changes</span><br><span>&nbsp;&nbsp;&nbsp; def patch_detect_changes(self, obj_info):</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; global detectCount</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; detectCount += 1</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; original_detect_changes(self, obj_info)</span><br><span>&nbsp;&nbsp;&nbsp; MutableValueVariable._detect_changes = patch_detect_changes</span><br><br><span>&nbsp;&nbsp;&nbsp; database = create_database('use a database supporting lists')</span><br><span>&nbsp;&nbsp;&nbsp; store = Store(database)</span><br><span>&nbsp;&nbsp;&nbsp; try:</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; store.execute("DROP TABLE withlist;")</span><br><span>&nbsp;&nbsp;&nbsp; except :</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; store.rollback()</span><br><span>&nbsp;&nbsp;&nbsp; store.execute("""</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CREATE TABLE withlist(</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; key int primary key,</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v int,</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; l text[]</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; """)</span><br><br><span>&nbsp;&nbsp;&nbsp; n = store.add(WithList(1))</span><br><span>&nbsp;&nbsp;&nbsp; del n</span><br><span>&nbsp;&nbsp;&nbsp; store.commit()</span><br><br><span>&nbsp;&nbsp;&nbsp; for i in range(10):</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n = store.get(WithList, 1)</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # access the list</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n.l</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # remove strong reference so the object is removed from the _alive</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # WeakValueDictionary in the store</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; del n</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; store.commit()</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print 'detect calls =', detectCount</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; detectCount = 0</span><br><br>The output will be :<br><br><span>detect calls = 3</span><br><span>detect calls = 4</span><br><span>detect calls = 6</span><br><span>detect calls = 8</span><br><span>detect calls = 10</span><br><span>detect calls = 12</span><br><span>detect calls = 14</span><br><span>detect calls = 16</span><br><span>detect calls = 18</span><br><span>detect calls = 20</span><br><br>J&uuml;rgen<br><br><br></p>
<div class="gmail_quote">On Sat, Oct 3, 2009 at 1:59 PM, J&uuml;rgen Kartnaller <span dir="ltr">&lt;<a href="mailto:kartnaller@...">kartnaller@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">The problem exists in 0.14 and 0.15<br><br>I tried to reproduce the problem with a simple example without success :(<br><br>J&uuml;rgen<div>
<div></div>
<div class="h5">
<br><br><div class="gmail_quote">On Fri, Oct 2, 2009 at 10:16 PM, Jamu Kakar <span dir="ltr">&lt;<a href="mailto:jkakar@..." target="_blank">jkakar@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">Hi J&uuml;rgen,<br><div>
<br>
On Fri, Oct 2, 2009 at 11:56 AM, J&uuml;rgen Kartnaller<br>
&lt;<a href="mailto:kartnaller@..." target="_blank">kartnaller@...</a>&gt; wrote:<br>
&gt; After a long time having problems with performance going down in our<br>
&gt; Zope/Storm applications I could now figure out where it is coming from. In<br>
&gt; my latest app using tornado and Storm I have the same problem.<br>
&gt;<br>
&gt; When using List or Pickle properties (both are derived from<br>
&gt; MutableValueVariable) I found that any time a property is read a flush event<br>
&gt; hook is added but never removed. The longer the app runs the more hooks are<br>
&gt; registered which result in low perfomance in store.flush.<br>
&gt; The flush event hook is unhooked on the 'stop-tracking-changes' event which<br>
&gt; is only emited if an object is removed from the database.<br><br>
</div>Are you using the latest version of Storm? &nbsp;I remember a problem<br>
like this being fixed some time ago. &nbsp;I think this is the fix for<br>
the problem I'm thinking of:<br><br>
revno: 275 [merge]<br>
committer: Thomas Herv&eacute; &lt;<a href="mailto:thomas@..." target="_blank">thomas@...</a>&gt;<br>
branch nick: trunk<br>
timestamp: Mon 2008-11-03 20:38:06 +0100<br>
message:<br>
 &nbsp;Merge variable-referenceset-leak [r=niemeyer,jkakar]<br><br>
 &nbsp;Change the way MutableValueVariable hooks up to the store event system, by<br>
 &nbsp;overriding get and set. This works around a leak discovered when using<br>
 &nbsp;PickleVariable in a ReferenceSet.<br><br>
Thanks,<br>J.<br>
</blockquote>
</div>
<br><br clear="all"><br>
</div>
</div>
<div class="im">-- <br>J&uuml;rgen Kartnaller, senior developer<br><br>Lovely Systems AG<br>Telefon +43 5572 908060, Fax +43 5572 908060-77<br>Schmelzh&uuml;tterstra&szlig;e 26a, 6850 Dornbirn, Austria<br><br>
</div>Sitz: Dornbirn, FB: Landesgericht Feldkirch, FN: 208859x, UID: ATU51736705<br>Aufsichtsratsvorsitzender: Christian Lutz<br>Vorstand: Manfred Schwendinger<br>
</blockquote>
</div>
<br><br clear="all"><br>-- <br>J&uuml;rgen Kartnaller, senior developer<br><br>Lovely Systems AG<br>Telefon +43 5572 908060, Fax +43 5572 908060-77<br>Schmelzh&uuml;tterstra&szlig;e 26a, 6850 Dornbirn, Austria<br><br>
Sitz: Dornbirn, FB: Landesgericht Feldkirch, FN: 208859x, UID: ATU51736705<br>Aufsichtsratsvorsitzender: Christian Lutz<br>Vorstand: Manfred Schwendinger<br>
</div>
Thomas Hervé | 3 Oct 2009 18:25
Favicon

Re: Performance Problems using List and Pickle properties

Le samedi 03 octobre 2009 à 15:05 +0200, Jürgen Kartnaller a écrit :
> So here is the code to reproduce the problem :

[Snip]

Thanks a lot for the example! It looks like there may be a bug indeed,
in the case you delete the object before flush. I've created a branch
(lp:~therve/storm/mutable-variables-flush-leak) to try to fix it, can
you check if the problem goes away with that branch? The diff is fairly
trivial to apply.

Thanks again,

-- 
Thomas

--

-- 
storm mailing list
storm <at> lists.canonical.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/storm
Jürgen Kartnaller | 3 Oct 2009 20:01
Favicon

Re: Performance Problems using List and Pickle properties

Thomas,
works perfect, thanks for the quick fix.

This fix will definitely increase the performance of our websites.
And we can stop restarting our apps every 60 min.

Jürgen

On Sat, Oct 3, 2009 at 6:11 PM, Thomas Hervé <thomas.herve-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> wrote:
Le samedi 03 octobre 2009 à 15:05 +0200, Jürgen Kartnaller a écrit :
> So here is the code to reproduce the problem :

[Snip]

Thanks a lot for the example! It looks like there may be a bug indeed,
in the case you delete the object before flush. I've created a branch
(lp:~therve/storm/mutable-variables-flush-leak) to try to fix it, can
you check if the problem goes away with that branch? The diff is fairly
trivial to apply.

Thanks again,

--
Thomas




--
Jürgen Kartnaller, senior developer

Lovely Systems AG
Telefon +43 5572 908060, Fax +43 5572 908060-77
Schmelzhütterstraße 26a, 6850 Dornbirn, Austria

Sitz: Dornbirn, FB: Landesgericht Feldkirch, FN: 208859x, UID: ATU51736705
Aufsichtsratsvorsitzender: Christian Lutz
Vorstand: Manfred Schwendinger
<div>
<p>Thomas,<br>works perfect, thanks for the quick fix.<br><br>This fix will definitely increase the performance of our websites.<br>And we can stop restarting our apps every 60 min.<br><br>J&uuml;rgen<br><br></p>
<div class="gmail_quote">
On Sat, Oct 3, 2009 at 6:11 PM, Thomas Herv&eacute; <span dir="ltr">&lt;<a href="mailto:thomas.herve@...">thomas.herve@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
Le samedi 03 octobre 2009 &agrave; 15:05 +0200, J&uuml;rgen Kartnaller a &eacute;crit :<br><div class="im">&gt; So here is the code to reproduce the problem :<br><br>
</div>[Snip]<br><br>
Thanks a lot for the example! It looks like there may be a bug indeed,<br>
in the case you delete the object before flush. I've created a branch<br>
(lp:~therve/storm/mutable-variables-flush-leak) to try to fix it, can<br>
you check if the problem goes away with that branch? The diff is fairly<br>
trivial to apply.<br><br>
Thanks again,<br><br>
--<br>Thomas<br><br>
</blockquote>
</div>
<br><br clear="all"><br>-- <br>J&uuml;rgen Kartnaller, senior developer<br><br>Lovely Systems AG<br>Telefon +43 5572 908060, Fax +43 5572 908060-77<br>Schmelzh&uuml;tterstra&szlig;e 26a, 6850 Dornbirn, Austria<br><br>Sitz: Dornbirn, FB: Landesgericht Feldkirch, FN: 208859x, UID: ATU51736705<br>Aufsichtsratsvorsitzender: Christian Lutz<br>Vorstand: Manfred Schwendinger<br>
</div>
Dan Presley | 8 Oct 2009 08:45
Gravatar

Basic question

I have a basic question not answered in the tutorial:  How does one 
connect to an existing SQLite database?  Thanks in advance.

Cheers

Dan Presley | 8 Oct 2009 09:04
Gravatar

Re: Basic question [Solved]

Never mind, I found out myself.  I got confused with the table exists 
exceptions.  I commented out the create table commands and the tutorial 
program ran fine.

Best Regards

I have a basic question not answered in the tutorial:  How does one
connect to an existing SQLite database?  Thanks in advance.

Cheers

Jürgen Kartnaller | 8 Oct 2009 14:00
Favicon

Re: Basic question

see: https://storm.canonical.com/Manual#SQLite

On Thu, Oct 8, 2009 at 8:45 AM, Dan Presley <dpresley-MwQsv8nNLIjR7s880joybQ@public.gmane.org> wrote:
I have a basic question not answered in the tutorial:  How does one
connect to an existing SQLite database?  Thanks in advance.

Cheers


--
storm mailing list
storm-33AaDErTWvAAkhNd+W/JZ0EOCMrvLtNR@public.gmane.org
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/storm



--
Jürgen Kartnaller, senior developer

Lovely Systems AG
Telefon +43 5572 908060, Fax +43 5572 908060-77
Schmelzhütterstraße 26a, 6850 Dornbirn, Austria

Sitz: Dornbirn, FB: Landesgericht Feldkirch, FN: 208859x, UID: ATU51736705
Aufsichtsratsvorsitzender: Christian Lutz
Vorstand: Manfred Schwendinger
<div>
<p>see: <a href="https://storm.canonical.com/Manual#SQLite">https://storm.canonical.com/Manual#SQLite</a><br><br></p>
<div class="gmail_quote">On Thu, Oct 8, 2009 at 8:45 AM, Dan Presley <span dir="ltr">&lt;<a href="mailto:dpresley@...">dpresley@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">I have a basic question not answered in the tutorial: &nbsp;How does one<br>
connect to an existing SQLite database? &nbsp;Thanks in advance.<br><br>
Cheers<br><br><br>
--<br>
storm mailing list<br><a href="mailto:storm@...">storm@...</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/storm" target="_blank">https://lists.ubuntu.com/mailman/listinfo/storm</a><br>
</blockquote>
</div>
<br><br clear="all"><br>-- <br>J&uuml;rgen Kartnaller, senior developer<br><br>Lovely Systems AG<br>Telefon +43 5572 908060, Fax +43 5572 908060-77<br>Schmelzh&uuml;tterstra&szlig;e 26a, 6850 Dornbirn, Austria<br><br>Sitz: Dornbirn, FB: Landesgericht Feldkirch, FN: 208859x, UID: ATU51736705<br>Aufsichtsratsvorsitzender: Christian Lutz<br>Vorstand: Manfred Schwendinger<br>
</div>
Martin DeMello | 20 Oct 2009 11:29
Picon

lazily subselecting from a resultset

Is there any way to lazily refine a resultset? Something like

a = store.find(Job, Job.done == True)
b = a.find(Job.status != 'failed')

martin


Gmane