[Systers-dev] Setting isolation level in storm

Andrew Grover andy.grover at gmail.com
Fri Jun 19 16:55:31 PDT 2009


On Fri, Jun 19, 2009 at 12:18 PM, kanika vats<kanika.krikan at gmail.com> wrote:
> I got to know that there's a general expectation in Storm that you will be
> using serializable isolation, so you'll probably want to be a bit careful if
> you use something other than that.I do not have much knowledge about
> isolation level but as far as i can see from the code at DlistUtils.py we
> are setting the isolation level to autocommit when we create the database
> and later restore it to old_isolation_level... what is the default isolation
> level that is stored in old_iso_lvl??

Probably SERIALIZABLE? Not sure. Stick a syslog in there if you want
to check for sure.

> Also please look into the matter as we can run into some strange unkown
> cosequences while using other isolation level in storm.What I got to know
> was :
>
>  "You need to be aware that Storm does caching and invalidates the
> cache on transaction boundaries (once you do commit() or rollback(),
> for instance).  This works perfectly when using "serializable-style"
> isolation levels, since the database and the cache will represent the
> same data.  If you change the isolation level, the caching on the
> Storm side will *still* happen, and will continue to be invalidated on
> transaction boundaries by default, so it's very important to keep this
> in mind when coding if you don't want to be surprised."
>
> Please let me know on what you think about this.Can it create any
> problems,if so how can we deal with them?

Schema changes are generally excluded from ORM caching. I would assume
you won't run into any issues. (Additionally, we're only creating
tables, so there's no chance for stale cached data to exist for them
prior to their creation.)

Regards -- Andy


More information about the Systers-dev mailing list