pracro:database
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
pracro:database [2010/06/03 16:33] – deva | pracro:database [2010/06/07 11:17] (current) – deva | ||
---|---|---|---|
Line 8: | Line 8: | ||
The first SQL command issued is BEGIN; | The first SQL command issued is BEGIN; | ||
If a ' | If a ' | ||
- | If the clienbt | + | If the client |
On reconnect to the session, the entire command string is replayed as it is, and the session is ready to continue where it left off. | On reconnect to the session, the entire command string is replayed as it is, and the session is ready to continue where it left off. | ||
- | On the pracro | + | On the Pracro |
- | ====Sequence numbers==== | + | =====Journal uptodateness check===== |
- | All sequence numbers must be obtained from a seperate SQL conenction, that is not affected by the SQL transactions. It is vital that these numbers are not reused in later sessions. | + | * Person A is working on a patient P. |
- | All sequence numbers used in the pracro sessions must therefor be used as strings, directly in the syntax strings. | + | * Person A commits the macro M, with data "data from A". |
+ | * Person A 'close no commit' | ||
+ | * Person B starts working on patient P. | ||
+ | * Person B commits | ||
+ | * Person B 'close and commit' | ||
+ | * Person A continues work on patient P. | ||
+ | * Person A sees the resume of M being "data from B", and acknowledges it. | ||
+ | * Person A 'close and commit' | ||
+ | Person A now **thinks** that the journal contains "data from B". But in fact it contains | ||
< | < | ||
- | global Db1 | + | data from B |
- | getSeq() | + | data from A |
- | { | + | |
- | Mutex.lock | + | |
- | s = Db1.exec(" | + | |
- | Mutex.unlock | + | |
- | return s; | + | |
- | } | + | |
- | + | ||
- | do_something | + | |
- | { | + | |
- | Db2 | + | |
- | | + | |
- | | + | |
- | } | + | |
</ | </ | ||
+ | This is due to two problems: The field shown on the active session is not nesecarily the one being commit, when the entire session is committed. Second person A cannot see what changes has been made by others. | ||
+ |
pracro/database.1275575593.txt.gz · Last modified: 2010/06/03 16:33 by deva