From 1cb43fbcde455575e69d2b8a5e6acdc1230f0a05 Mon Sep 17 00:00:00 2001 From: Jan Huwald Date: Mon, 27 Jan 2014 23:47:51 +0100 Subject: change lock mode during update operation to exclusive 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. 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 -- cgit v0.10.1