JINMEI Tatuya
246a87a4a6
[2211] let the thread abort if it sees an unexpected exception, rather rethrow.
...
update the test case and log message accordingly.
2012-10-23 09:48:08 -07:00
JINMEI Tatuya
113201b72b
[2211] s/swapDataSrcClientLists/setDataSrcClientLists/ and changed the behavior
...
the users of this method only need the set behavior, and the previous code
actually didn't swap them as expected anyway.
2012-10-23 09:37:19 -07:00
JINMEI Tatuya
a8dcc73698
[2211] style fixes to test JSON configs
2012-10-23 09:30:48 -07:00
Marcin Siodelski
6c12b4328d
[2316] Replace constructor with default param values with constructor
...
without parameters.
Having constructor with default params values caused build issues on
Mac/clang which complained about not providing constructor's params and ignores
default ones.
2012-10-23 15:51:15 +02:00
Jelte Jansen
80b0cf61a8
[2210] update catch/error logs in datasrc reconfigure
2012-10-23 14:37:31 +02:00
Marcin Siodelski
5765f9d648
[master] Merge branch 'trac2304'
2012-10-23 10:35:14 +02:00
Mukund Sivaraman
7c4e02c157
[2236] Remove obsolete comment
2012-10-23 10:25:14 +05:30
Mukund Sivaraman
2eaf01995b
[2236] Don't use PTHREAD_MUTEX_ERRORCHECK in non-debug builds
...
Also disable tests in non-debug builds that depend on
PTHREAD_MUTEX_ERRORCHECK.
2012-10-23 09:52:40 +05:30
Mukund Sivaraman
8b19f3a80a
[2236] Remove config.h include from sync.h
...
... and move it to sync.cc. This is so that sync.h can be dist-ed.
Also add comments to some methods that may not be available in
non-debug builds.
2012-10-23 09:28:48 +05:30
Mukund Sivaraman
98db15a31f
[2236] Add comments to configure.ac about --enable-debug and performance
2012-10-23 09:25:20 +05:30
Mukund Sivaraman
4f4b3724e1
[2236] Access Mutex::locked() only when ENABLE_DEBUG is defined
2012-10-23 09:24:50 +05:30
Mukund Sivaraman
77e3283447
[2361] Update comment about local_plugins directory
2012-10-23 07:36:52 +05:30
Mukund Sivaraman
a9688bc111
Revert "Merge branch 'trac2198_3'"
...
This reverts commit e6ba20b0907ab7e861e608a71a35f71ab228e79f, reversing
changes made to c9ba8373e271fb3c966fb59813c21ca8c575354d.
2012-10-23 06:06:26 +05:30
JINMEI Tatuya
bb59b815c9
[2211] added notes about ownership on the returned value of findClientList().
2012-10-22 12:08:42 -07:00
JINMEI Tatuya
e13d083a39
[2211] wording/grammer fixes to documentation and comments.
2012-10-22 11:26:00 -07:00
JINMEI Tatuya
07b436b864
[2211] use swap instead of splice. for this purpose it's enough and simpler.
2012-10-22 10:55:53 -07:00
Michal 'vorner' Vaner
252ef72781
Revert "[2209] Interface of the getCachedZoneWriter()"
...
This reverts commit 812392465ae1ffa4a583186fd48f4c7aff1640dd.
This should have gone to a branch, not to master. Reverting it until it
gets reviewed properly.
2012-10-22 16:48:24 +02:00
Michal 'vorner' Vaner
812392465a
[2209] Interface of the getCachedZoneWriter()
...
Unlike what the ticket suggests, it takes concrete origin parameter, not
some yet unknown config value, for two reasons:
* The format of config is not known.
* Leaking some details about what memory segment or whatever is being
used for the cache through the interface looks like a bad idea. Even
leaking the existence of the cache is enough.
2012-10-22 16:43:18 +02:00
Jelte Jansen
20fdec048d
[2210] rename DataSrcClientListsPtr to ClientListMapPtr
2012-10-22 15:08:34 +02:00
Jelte Jansen
3a5e410f45
[2210] Address review comments
...
as discussed in the ticket comments
2012-10-22 14:55:33 +02:00
Marcin Siodelski
9a52c2a5a5
[2304] Fixed build issues on Mac and BSD systems.
2012-10-22 14:40:12 +02:00
Marcin Siodelski
c974d3a5e4
[2304] Removed enum initializers for DataType values.
2012-10-22 11:14:24 +02:00
Mukund Sivaraman
ae2e285fb9
[master] Execute run_dbutil.sh using shell
...
This is necessary because run_dbutil.sh sometimes loses its execute
(+x) mode bit when regenerated, and tests fail due to it.
2012-10-22 06:50:26 +05:30
Mukund Sivaraman
e6ba20b090
Merge branch 'trac2198_3'
2012-10-22 06:25:03 +05:30
Mukund Sivaraman
4e199b28f4
[2198] Move get methods into unnamed namespace
2012-10-22 05:14:38 +05:30
Mukund Sivaraman
c3a8f64b91
[2198] Fix library paths to add lib/util/threads/ too (Mac OS test failure)
2012-10-22 05:14:38 +05:30
Mukund Sivaraman
73f49fc9d9
[2198] Avoid static destruction fiasco with InterprocessSyncFile and logger
2012-10-22 05:14:38 +05:30
Mukund Sivaraman
59d1e7799c
[2198] Check for EDEADLK too when using Mutex::tryLock()
2012-10-22 05:14:38 +05:30
Mukund Sivaraman
d7a9543879
[2198] Link -lpthread in libb10-threads target
2012-10-22 05:14:38 +05:30
Mukund Sivaraman
1bb3279cc1
[2198] Don't return anything from thread functions
2012-10-22 05:14:38 +05:30
Mukund Sivaraman
9a85c00b16
[2198] Update comment
2012-10-22 05:14:37 +05:30
Mukund Sivaraman
9de48090c0
[2198] Test the non-blocking variant of Mutex::Locker
2012-10-22 05:14:37 +05:30
Mukund Sivaraman
11df86c57f
[2198] Check pthread_mutex_trylock()'s return value
2012-10-22 05:14:37 +05:30
Mukund Sivaraman
699a941cab
[2198] Revert include to local
2012-10-22 05:14:37 +05:30
Mukund Sivaraman
a80cd447a1
[2198] Stop using direct lock methods on Mutex inside InterprocessSyncFile
2012-10-22 05:14:37 +05:30
Mukund Sivaraman
48bfbccf4e
[2198] Fix include filename
2012-10-22 05:14:37 +05:30
Mukund Sivaraman
13e9951ecd
[2198] Make direct methods on Mutex private
2012-10-22 05:14:37 +05:30
Mukund Sivaraman
f8fb9a002d
[2198] Add a block argument to Mutex::Locker's constructor
2012-10-22 05:14:37 +05:30
Mukund Sivaraman
1b638d6813
[2198] Add AlreadyLocked exception to Mutex::Locker
2012-10-22 05:14:36 +05:30
Mukund Sivaraman
638f92b82b
[2198] Remove dependency on libb10-util in src/lib/util/unittests/
2012-10-22 05:14:36 +05:30
Mukund Sivaraman
1c5c694f66
[2198] First use a mutex for mutual exclusion among threads, then a lock file
2012-10-22 05:14:36 +05:30
Mukund Sivaraman
b09b4308af
[2198] Add Mutex::tryLock() and make lock methods public
...
tryLock() is necessary inside InterprocessSyncFile. It also doesn't
make sense afterwards to make a dynamically constructed Mutex::Locker
that lives after the basic block is exited. So lock() and unlock()
have also been made public.
I've added comments to discourage the use of these methods directly
and use the Mutex::Locker where applicable.
2012-10-22 05:14:36 +05:30
Mukund Sivaraman
2d014223ce
[2198] Test that locks work from threads
...
This test fails now because there's no mutual exclusion among threads
in the implementation.
2012-10-22 05:14:36 +05:30
Mukund Sivaraman
0a4ef3221c
[2198] Build threads directory first because . depends on it
2012-10-22 05:14:32 +05:30
Michal 'vorner' Vaner
c9ba8373e2
Add a virtual destructor
...
To fix compilation.
2012-10-20 15:11:43 +02:00
Michal 'vorner' Vaner
7868cb5a0c
Merge #2207
...
"define and implement (datasrc::memory::)ZoneUpdater class"
It is now ZoneWriter.
No changelog.
Conflicts:
src/lib/datasrc/memory/Makefile.am
2012-10-20 11:11:33 +02:00
Michal 'vorner' Vaner
08e8d762ad
[2207] Note about compilation problem
2012-10-20 11:09:58 +02:00
JINMEI Tatuya
6cf94944f1
[2211] (unrelated fix) make sure the first time config is installed
...
it's a topic of #2363 , but the change is small and is better to be fixed
here because it would cause conflict.
2012-10-19 23:59:59 -07:00
JINMEI Tatuya
a61ab28f80
[2211] added note about exception cases in remote config handler.
2012-10-19 23:34:12 -07:00
JINMEI Tatuya
5ac7c2d114
[2211] cleanup: removed now-unused stuff: auth_srv mutex, client lists, etc.
2012-10-19 23:08:53 -07:00