1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 <2016> 2017 2018 2019 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 <2016> 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Lock/Mutex to prevent "caget" from cutting in between updating multiple fields |
From: | "Zhang, Dehong" <[email protected]> |
To: | "[email protected]" <[email protected]> |
Date: | Fri, 29 Apr 2016 23:12:19 +0000 |
Hi,
In my custom record, I need to update multiple fields atomically so they stay synchronized -- all updated, or none updated; not a few updated, but a few with the old data. If I use my own mutex, I suspect that "caget" can cut in between the updating and gets, for example, new data with old time stamp, or old data with new time stamp depending on the order of updating.
And I guess "camonitor" would not have this problem because it would be the server pushing the whole set (field itself and time stamp for instance). Is this right?
So to close this hole with "caget", which global lock should I use? dbScanLock?
Thank you, best regards, Dehong
|