summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Huwald <jh@sotun.de>2014-01-27 22:47:51 (GMT)
committerJan Huwald <jh@sotun.de>2014-01-27 22:47:51 (GMT)
commit1cb43fbcde455575e69d2b8a5e6acdc1230f0a05 (patch)
tree963f15e70666dd588ba29d3bb43a16b388678130
parent4cfc146c8cc1470dca98a6ea6e4fcf3a5f2378c9 (diff)
change lock mode during update operation to exclusiveHEADmaster
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-xp2ptbl4
1 files changed, 2 insertions, 2 deletions
diff --git a/p2ptbl b/p2ptbl
index 341cecd..fee7690 100755
--- a/p2ptbl
+++ b/p2ptbl
@@ -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
contact: Jan Huwald // Impressum