diff options
author | Jan Huwald <jh@sotun.de> | 2014-01-27 22:47:51 (GMT) |
---|---|---|
committer | Jan Huwald <jh@sotun.de> | 2014-01-27 22:47:51 (GMT) |
commit | 1cb43fbcde455575e69d2b8a5e6acdc1230f0a05 (patch) | |
tree | 963f15e70666dd588ba29d3bb43a16b388678130 | |
parent | 4cfc146c8cc1470dca98a6ea6e4fcf3a5f2378c9 (diff) |
Change shared table lock to exclusive lock when updating the table.
This fixes a race condition the could cause loss of data under
parallel update operations.
-rwxr-xr-x | p2ptbl | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -140,7 +140,7 @@ case "$1" in filter "$tbl" "$@" ;; update) - lockTable -s "$2" + lockTable -x "$2" update "$2" "$3" "$4" "$5" ;; merge) @@ -155,4 +155,4 @@ case "$1" in *) printArgs ;; -esac
\ No newline at end of file +esac |