List:Cluster« Previous MessageNext Message »
From:Diego Martínez Date:February 11 2011 3:34pm
Subject:Re: Hibernate - locking tables
View as plain text  
Hi Andrew,

You're right. Thank you very much for the information.

Best regards, Diego Martínez


2011/2/8 Andrew Armstrong <andrew@stripped>

> In my experiencing using NHibernate (the .Net Hibernate port); table locks
> are never taken, its locks are handled through transactions (row locks etc)
> - and cluster supports transaction isolation.
>
> Are you sure table locks are being used? I would imagine that unless you
> explicitly ask for table locks, Hibernate will be using transactions as
> well
> to manage concurrency/isolation.
>
> - Andrew
>
> -----Original Message-----
> From: Diego Martínez [mailto:tabarem@stripped]
> Sent: Wednesday, 9 February 2011 6:16 AM
> To: Frazer Clement
> Cc: Wagner Bianchi; cluster@stripped
> Subject: Re: Hibernate - locking tables
>
> Ok. I understand how it works. Thank you very much!!.
>
> Best regards, Diego Martínez
>
>
> El 8 de febrero de 2011 09:01, Frazer Clement
> <frazer.clement@stripped>escribió:
>
> > Hi Diego,
> >  Ndb Cluster has row level locking.  Transactions take row locks before
> > updating or deleting existing rows.  Two transactions attempting to
> update
> > the same row will be serialised by the system.  The second transaction
> will
> > see the effects of the first.  The final effect will be as if the
> > transactions were run in some serial order.
> >
> >  I am not sure how / if Hibernate uses table locks directly, or just
> > expects that the DBMS 'somehow' avoids races between different users. If
> it
> > uses Table locks directly, and is using them for some purpose other than
> > serialising updates to the database, then this may not work with Cluster.
> >  If it just expects that the DBMS present a consistent view of the
> database,
> > and serialises competing transactions, then this can work fine with
> Cluster.
> >
> >  Perhaps if you can explain how/why Hibernate uses Table locks, then we
> can
> > determine whether or not it will work unmodified with Cluster.
> >  The 'Single User Mode' which Wagner Bianchi mentions is probably not
> what
> > you want to use, except on very rare occasions (e.g. DBA maintenance
> windows
> > etc.).
> >
> > Frazer
> >
> >
> > Diego Martínez wrote:
> >
> >> Thanks for your response. My question are what happens when several
> >> threads
> >> update the same tables. For example, if I have a web service application
> >> where multiple threads are updating the product table and no exist table
> >> locking, the result would be completely unexpected. Each thread would
> >> update
> >> the same table, but in a different node?. What would be the end result?.
> >>
> >> Best regards, Diego Martínez
> >>
> >>
> >> El 7 de febrero de 2011 12:52, Wagner Bianchi
> >> <wagnerbianchijr@stripped>escribió:
> >>
> >>  Hi Martinez,
> >>>
> >>> I understand the unique and efficient way to lock tables on MySQL
> Cluster
> >>> SQL NODES is using "SINGLE-USER MODE". LOCK TABLES [WRITE | READ] will
> >>> work
> >>> as expected, but, using only one SQL NODE. You'll LOCK TABLE t1 TO
> WRITE
> >>> on
> >>> SQL NODE 1, but your application will can access the same table through
> >>> the
> >>> SQL NODE 2 and write to that table.
> >>>
> >>> Let us know more about your project and perhaps we can help you.
> >>>
> >>> Best regards.
> >>> --
> >>> Wagner Bianchi
> >>>
> >>> 2011/2/7 Diego Martínez <tabarem@stripped>
> >>>
> >>> Hi,
> >>>
> >>>> Members of the list have experience using MySQL Cluster through
> >>>> Hibernate?
> >>>> I
> >>>> am worried, because I understand that MySQL Cluster does not
> support
> >>>> locking
> >>>> tables for example.
> >>>>
> >>>> Do you know design patterns to use this new engine?
> >>>>
> >>>> Best regards, Diego Martínez
> >>>>
> >>>>
> >>>
> >>
> >
> > --
> > Frazer Clement, Senior Software Engineer,
> > MySQL Cluster / Oracle - www.mysql.com
> > Office: Edinburgh, UK
> >
> > Are you MySQL certified?  www.mysql.com/certification
> >
>
>
> --
> MySQL Cluster Mailing List
> For list archives: http://lists.mysql.com/cluster
> To unsubscribe:    http://lists.mysql.com/cluster?unsub=1
>
>

Thread
Hibernate - locking tablesDiego Martínez7 Feb
  • Re: Hibernate - locking tablesWagner Bianchi7 Feb
    • Re: Hibernate - locking tablesDiego Martínez8 Feb
      • Re: Hibernate - locking tablesFrazer Clement8 Feb
        • Re: Hibernate - locking tablesDiego Martínez8 Feb
          • RE: Hibernate - locking tablesAndrew Armstrong8 Feb
            • Re: Hibernate - locking tablesDiego Martínez11 Feb