db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Fox (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (TORQUE-281) Only issue SQL update with columns whose value is changed in dbObject, since it was loaded from db
Date Sun, 21 Apr 2013 20:51:15 GMT

     [ https://issues.apache.org/jira/browse/TORQUE-281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Fox resolved TORQUE-281.
-------------------------------

    Resolution: Won't Fix
      Assignee: Thomas Fox

A database is in principle a device where many users can write to. 
This means a row in the database can be written by a concurrent connection at any time.
There are two ways known to me to be sure that all columns of a row are in the desired state
a) write all rows
b) put a write lock on the row while reading and then write only the changed columns

Torque has always chosen the method a). It may be a bit slower but it is simple. b) has the
problem that a lock is put on a row, which can cause problems like when to lock a row, dealing
with unreleased locks, deadlocks etc.

                
> Only issue SQL update with columns whose value is changed in dbObject, since it was loaded
from db
> --------------------------------------------------------------------------------------------------
>
>                 Key: TORQUE-281
>                 URL: https://issues.apache.org/jira/browse/TORQUE-281
>             Project: Torque
>          Issue Type: Improvement
>            Reporter: rajguru
>            Assignee: Thomas Fox
>
> This means dbObject needs to have a way to see oldValue and newValue. If so also provide
some hooks in the code before update/after update/before insert/after insert/before delete
and after delete, so one can plugin an auditing code to log the oldValue to newValue change

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message