[ 
http://issues.apache.org/jira/browse/DERBY-1822?page=comments#action_12438514 ] 
            
Mamta A. Satoor commented on DERBY-1822:
----------------------------------------

Laura, I looked at the latest patch and following line needs rewording. 
"To lock the entire FlightsAvailable table in exclusive mode for a transaction 
that will update many rows, but where no single statement will update enough 
rows, acquire an exclusive table lock on the table. "

Here is what the example is trying to do, please feel free to word it as seems 
appropriate.
Consider a trasnaction with multiple update statements, each one of which 
acquires couple row locks here and there. Since each individual update 
statement acquires only few row level locks, the transaction will not 
automatically upgrade the locks to a table level lock. But all of the update 
statements collectively endup getting and releasing large number of locks and 
may even run into deadlocks. For such transactions, it might be better to just 
acquire a table level lock at the beginning of the transaction. This way, 
individual updatement statements won't have to keep acquiring and releasing row 
level locks.

One suggestion for the rewording of the above statement
"Lock the entire FlightsAvailable table in exclusive mode for the transaction 
that will update many rows, but where no single update statement will update 
enough rows to acquire an exclusive table lock on the table. "


> LOCK TABLE example and description in reference manual should get replaced by 
> a 'real' example
> ----------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1822
>                 URL: http://issues.apache.org/jira/browse/DERBY-1822
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.1.5, 10.3.0.0
>            Reporter: Myrna van Lunteren
>         Assigned To: Laura Stewart
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: derby1822.diff, derby1822_2.diff, rrefsqlj40506.html, 
> rrefsqlj40506.html
>
>
> The Example in the documentation for LOCK TABLE looks jumbled.
> It looks like part of it is based on a demo that was part of the pre-quel to 
> Derby. The current toursdb demo is based on it, and thus includes reference 
> to the table 'Flights', so it looks as if the queries *might* be possible, 
> but the table listed (HotelAvailability) does not exist. 
> Then there is mention of the table People, which doesn't exist either, 
> A proper example needs to be put in place.
> Note that the description above the example mentions Hotels, this probably 
> was supposed to be removed also.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to