Re: synchronization problem

2008-03-31 Thread PENPEN
But I think the increment of the version column is the same with the example of Poll I mentioned in the previous post. If the transaction is not used, the read action is separated with the write action by default. The problem still can happen. Or do you have some special method to update this

Re: synchronization problem

2008-03-30 Thread PENPEN
I checked the transaction module of django. I think it could work. But why do you prefer this version column solution? Does it have better performance? On 3月31日, 上午9时54分, meppum <[EMAIL PROTECTED]> wrote: > I found this thread helpful. > >

Re: synchronization problem

2008-03-30 Thread Mark Green
On Sun, 2008-03-30 at 17:49 -0700, meppum wrote: > The easiest way to deal with this is to create a "version" column that > gets updated with the current version number of the row in the > database. Increment this column value each time a save is performed on > that row. Override the save method

Re: synchronization problem

2008-03-30 Thread Karen Tracey
On Sun, Mar 30, 2008 at 8:45 AM, PENPEN <[EMAIL PROTECTED]> wrote: > > Hi Carl, > I didn't mention to the syncdb of manage.py. > I'm talking about the problem that may happen when trying to access > the db. > > Take a poll for exmaple. It may happen that 2 users vote at the same > time. A vote

Re: synchronization problem

2008-03-30 Thread PENPEN
Hi Carl, I didn't mention to the syncdb of manage.py. I'm talking about the problem that may happen when trying to access the db. Take a poll for exmaple. It may happen that 2 users vote at the same time. A vote action is made in the three steps: 1. read the old counter 2. add the counter by 1

Re: synchronization problem

2008-03-30 Thread Carl
Hi PenPen, what do you mean with 'the multi-thread scenario'? I assume you already know the syncdb param for the manage.py? Best regards, Carl On 30 Mrz., 13:12, PENPEN <[EMAIL PROTECTED]> wrote: > Does Django provide any method to handle the synchronization problems > with DB? How does it

synchronization problem

2008-03-30 Thread PENPEN
Does Django provide any method to handle the synchronization problems with DB? How does it keep the DB's consistency in the multi-thread scenario? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.