# HG changeset patch # User Dan Creswell # Date 1276335751 -3600 # Node ID a77f0a9ed93c955758094232fe61c6d709eb0bc3 # Parent 243c74d599bf3409045ebb52d362b6cfb08c519e Add support for optimistic log batching. diff -r 243c74d599bf -r a77f0a9ed93c ChangeLog --- a/ChangeLog Sat Jun 12 10:41:47 2010 +0100 +++ b/ChangeLog Sat Jun 12 10:42:31 2010 +0100 @@ -1,1607 +1,20 @@ -2008-07-03 Dan Creswell - - * Released 2.0fcs - -2008-03-09 Dan Creswell - - * Updated to Db 3.2.74 - - * Updated backport-util-concurrent - includes support for JDK 6 - - * Released 2.0-rc4 - -2008-03-05 Dan Creswell - - * Improved EventGenerator registration concurrency - -2008-02-24 Dan Creswell - - * Added an option (syncNotifyOnWrite) to enable synchronous event processing in - cases where deterministic behaviour is required for *IfExists - note this - reduces performance. - -2008-02-02 Dan Creswell - - * Fix a false warning of schema conflicts in hierarchical matching situations. - - * Removed an errant System.err.println() in ExistsFactory - -2007-12-31 Dan Creswell - - * Released 2.0-rc2 - -2007-12-23 Dan Creswell - - * Updated to Db 3.2.68 - -2007-11-14 Dan Creswell - - * Fix incorrect notify clause in FifoSearchVisitorImpl which generates an - IllegalMonitorStateException - -2007-11-04 Dan Creswell - - * Revised ThreadStat to not include System threads in the count - - * Fixed a problem with *Exists not exiting at the point where - existing conflicts have been resolved. - -2007-09-23 Dan Creswell - - * Updated MonitorStats to accept a loop-time in seconds. Zero dumps - stats once, otherwise every loop-time seconds. - -2007-08-31 Dan Creswell - - * Fix take accounting problem in bulk take leading to negative counts - -2007-08-30 Dan Creswell - - * Added tool to selectively reset lookup settings from a configuration - file - -2007-08-12 Dan Creswell - - * Released 2.0-rc1 - -2007-08-04 Dan Creswell - - * Revised some default logger settings - - * Added a ThreadStat - - * Added support for specifying Db cache size in kilo, mega or giga bytes. - (original patch provided by Roshan Sequeira modified by Dan) - -2007-05-20 Dan Creswell - - * Update to Db 3.2.23 - - * Released 2.0beta - -2007-05-08 Dan Creswell - - * Fix a problem with CacheIndexer initialization in RootStorage - which could break null templates on contents() (as used by - Dashboard amongst other things). - -2007-05-07 Dan Creswell - - * Make transaction exception thrown when transactions are active - during snapshot more explicit - - * Add StatsDumper to regularly dump all active stats to - console log - - * Add stats for internal queues - - * Removed several independent debug configuration variables that - have been superceeded by proper stats. - - * Released 2.0alpha4 - -2007-04-30 Dan Creswell - - * Update documentation to cover loopback transaction manager - -2007-04-23 Dan Creswell - - * Transaction end is now signalled via the event queue - - * Fix bug where entry repository might be incorrectly initialized - during recovery - -2007-04-22 Dan Creswell - - * Database cache size should be a long - - * Revert most of backport-util-concurrent changes due to race - conditions - - * TxnState now uses synchronized not a heavyweight Mutex - - * Fix bug where transactions weren't finalized on prepareAndCommit - -2007-03-13 Dan Creswell - - * Added stat to track missed reads/takes - -2007-03-09 Dan Creswell - - * Released 2.0alpha3 - -2007-03-05 Dan Creswell - - * Fixup dashboard scripts in installer to work with new backport - util-concurrent libraries - -2007-02-28 Dan Creswell - - * Fix a race condition in the lazy instantiation of EntryRepositories - - * Make BlockingOps stat work again after removing SearchTasks - infrastructure - - * Add a stat to track number of listeners on notify.EventQueue - - * Fix EventQueue leak in bulk take - -2007-02-07 Dan Creswell - - * Revised blocking operation implementations to use notify core - - * Port to the backport util-concurrent to take advantage of JDK 5's - concurrency improvements whilst being backward compatible to JDK 1.4 - - * Added a prototype nio transport based on Apache Mina - - * Removed old experimental transport - - * Fixes for installer scripts where spaces are in the insane default - JDK install path on Windows. - - * Improved speed of MangledEntry serialization for faster transport and - storage - - * Released 2.0alpha2 - -2007-01-01 Dan Creswell - - * Released 2.0alpha - -2006-12-28 Dan Creswell - - * Make blocking operation dispatch faster and less costly - -2006-12-27 Dan Creswell - - * Implement ColocatedAgent support - - * Implement additional statistics - -2006-12-12 Dan Creswell - - * Modify DumpRegistry to support more lookup location options - - * Update to JE 3.2.13 - -2006-11-30 Dan Creswell - - * Fix race conditions in cache indexing - - * Reduce cache indexer stack to one - -2006-09-29 Dan Creswell - - * Downgraded to 2.1.30 - temporary workaround for issue in 3.0.12 - - * Released 1.29 - -2006-09-26 Dan Creswell +2010-06-12 Dan Creswell - * Released 1.27 - -2006-09-19 Dan Creswell - - * Fix a problem with active lease reaping not purging all relevant - entry's. - -2006-08-18 Dan Creswell - - * Remove old code for logging failed searches enabled - by logDebug - - * Rename logDebug to logCounts - - * Fix a problem where the WriteDaemon was deemed inactive too often - leading to excessive thread creation - - * Updated to Db/Java 3.0.12 - -2006-08-07 Dan Creswell - - * Add support for logging details of failed searches - -2006-07-14 Dan Creswell - - * Add a -Dforce=true option to SyncAndShutdown to force shutdown of blitz - in face of active transactions. - - * Fix a problem where remote calls may be refused due to cleanup failure - in face of active transactions - - * Fix potential ConcurrentModificationException in TxnManagerState.abortAll - - * Released 1.26 - -2006-07-01 Dan Creswell - - * Increase log levels on event sending code to assist in debugging issues - with notify. - -2006-05-24 Dan Creswell - - * Fix a problem in EntryViewImpl which could lead to duplicate Entry's - returned by contents - - * Released 1.25 - -2006-05-23 Dan Creswell - - * Tweak logger output for WriteQueue stats - - * Add a headless option to the installer - (thanks to Robert Barnebey for testing duties) - - * Revised configuration defaults for installer to be in line with current - preferred settings - - * Make TimeBarrier mode checkpoint at flushes to improve database - utilization and performance - -2006-03-27 Dan Creswell - - * Added logging to Annotating streams to allow better debugging of - codebase related issues. - -2006-03-03 Dan Creswell - - * Fix phoenix configuration in installer to include jsk-dl.jar as part of - codebase - - * Released 1.24 - -2006-02-22 Dan Creswell - - * Fix ServiceLocator unicast lookup to correctly assert a security manager - otherwise code downloading is broken. - - * Fix dashboard scripts to use Jini 2.1 jars only - - * Released 1.23 - -2006-02-19 Dan Creswell - - * Modify LockReleaseCallback to use WeakReference for SearchVisitors to - reduce memory footprint - - * Released 1.22 - -2006-02-15 Dan Creswell - - * Upgrade to Db 2.1.30 - -2006-02-14 Dan Creswell - - * Fix EventGeneratorImpl/VisbilityImpl.ping() to not hold a lock across the - sequence number log which can cause deadlock if event queue bounding is - enabled. - - * Released 1.22-pre1 (limited circulation) - -2006-02-10 Dan Creswell - - * Fix up Rio config to use Jini 2.1 .jars - -2006-02-02 Dan Creswell - - * Rewrite the contents() core. It was just way too complex, had too much - retro-fitting and there have been some complaints of duplicates which will - be down to a hole in the overly complex locking scheme of the old version. - -2006-02-01 Dan Creswell - - * Make sure we check for expired transactions in loopback mgr at time of - commit or abort. - - * Released 1.21 - -2006-01-30 Dan Creswell - - * Fix incorrect import in lease handlers configuration - - * Released 1.21-pre4 - -2006-01-29 Dan Creswell - - * Fix deadlock which can occur when an operation attempts to add state - to TxnState whilst it is concurrently being resolved. These operations - should receive an exception indicating a user-programming error - but instead cause deadlock. - - * Fix bug where we won't kill off associated notify's if we abort a - non-null transaction. - -2006-01-26 Dan Creswell - - * Make sure we close RandomAccessFiles used in logging to prevent some - OS'en running out of file handles (some seem to cleanup on their own). - - * Released 1.21-pre3 (limited circulation) - -2006-01-19 Dan Creswell - - * Add support for a loopback transaction manager which can be enabled by - defining it's Exporter using the configuration variable loopbackTxnExporter. - Note the manager can only be used to co-ordinate transactions against the - blitz instance that it shares the JVM with. It cannot co-ordinate multiple - and/or remote participants such as other Blitz instances - [EXPERIMENTAL - USE AT YOUR PERIL] - -2006-01-12 Dan Creswell - - * Fix bug in BlitzServiceImpl.newView where for JavaSpace05 compatibility - we should only hold locks if the transaction is non-null. Do the same - for LocalSpace. Thanks to Simon Vicary for the bug report and unit test - - * Released 1.21-pre2 - -2006-01-09 Dan Creswell - - * Remove unnecessary BitIndex copy from BitmapIndexer - BitIndex's are - thread safe so we can iterate without copying. - -2006-01-07 Dan Creswell - - * Revise transaction abort to spot situations where we needn't write an - entry to disk even though we have operations. This optimization is - triggered when the associated transaction is active and thus no records - have been written to disk such that undo can be done entirely in memory. - - * Fix an unlikely race condition where transaction operations could occur - after a decision had been taken to optimize and not emit a log record to - disk. These additional operations would invalidate the decision due to the - changes in state wrought on a transaction. - -2006-01-05 Dan Creswell - - * For write and write(Collection) have proxy populate stub and uuid fields - to save on network traffic and serialization costs. - -2006-01-04 Dan Creswell - - * Remove offset from MangledField and use the loop index server-side - to derive it. - -2006-01-03 Dan Creswell - - * Add support to experimental transport for transaction participant. - - * Fixed a socket leak in the experimental transport - -2005-12-29 Dan Creswell - - * Fix experimental transport to do readIfExists and takeIfExists correctly - rather than treat them like their normal brethren. - -2005-12-20 Dan Creswell - - * Released 1.20 - -2005-12-09 Dan Creswell + * Blitz Pure Java Version 2.1.1 - * Make Blitz's internal view generation for contents methods strictly - apply the entry limit so as to cap memory usage. - -2005-12-08 Dan Creswell - - * Fix up nio experimental transport to allow clients to exit (convert - Txer to use of Daemon threads). - -2005-12-07 Dan Creswell - - * Add updateContents configuration variable which can be used to disable - dynamic updating of contents views - useful for memory consumption control. - -2005-12-03 Dan Creswell - - * Fixed deadlock when checkpointing happens concurrently with creation - of a store by EntryReposFactory - - * Released 1.19 - -2005-11-26 Dan Creswell - - * Make LocalSpace support JavaSpace05 and leases and proper RemoteEvent - setup - - * Updated documentation to make memory configuration information - more obvious. - - * Released 1.18 - -2005-11-25 Dan Creswell - - * More JINI 2.1 documentation tweaks - - * Fix preferred-list problems causing conflicts - - * Remove dependence on jini-ext.jar - - * Update service-ui documentation for JINI 2.1 - - * Separate preferred list generation for blitz-dl.jar into separate target - - * Released 1.17 - -2005-11-21 Dan Creswell - - * Optimize contents matching to stop doing hierarchy matching once one - of the template set has hit. - -2005-11-20 Dan Creswell - - * Integrate experimental nio transport. - -2005-11-02 Dan Creswell - - * Fix a problem where TxnLock failed to correctly handle a null callback - - * Fix a problem where duplicate Entry's could be returned from an - EntryView in presence of concurrent writes (affects contents()) - - * Released 1.16 - -2005-11-01 Dan Creswell - - * Fix StatsBoard::getStats() deadlock - thanks to Sirma Group for report - and suggested fix. - - * Fix a bug in contents() where the view is dynamically updated with - inappropriate Entry's - - * Update Db/Java to 2.0.90 - - * Released 1.15 - -2005-10-27 Dan Creswell - - * Make sure WriteEntryOpInfo only dirties at recovery if it's entry - wasn't on disk - - * Fix a recovery issue where the pristine state of a write was inserted - into the cache rather than the up-to-date state found on disk - - * Released 1.14 - -2005-10-20 Dan Creswell - - * Eliminate the additional roundtrip incurred downloading the first chunk of - EntryChits for use with JavaSpaceAdmin/JavaSpace05::contents - - * Released 1.13 - -2005-10-19 Dan Creswell - - * Fix problem where we're not holding locks when doing - JavaSpace05::contents() - -2005-10-17 Dan Creswell - - * Implement intelligent readahead based on use or not of snapshot method - -2005-10-07 Dan Creswell - - * Make sure Lifecycle.unregister is passed the correct reference - - * Change debugging logging down to levels of FINE or lower - - * Add multiplexing to nio test transport - - * Released 1.13-pre9 - -2005-09-26 Dan Creswell - - * Added some codebase caching into AnnotatingObjectOutputStream - because the RMIClassLoader infrastructure can sometimes trigger - opening of socket to codebase for each call to get a codebase for - a class. - -2005-09-16 Dan Creswell - - * Removed the aging support from ArcCache because it penalizes - concurrent take support. - -2005-09-15 Dan Creswell - - * Implemented nio-based test transport - - * Fixed LeaseImpl to be public for nio test transport - -2005-09-11 Dan Creswell - - * Fixed installer to work with JINI 2.1 - - * Released 1.13-pre8 - -2005-09-10 Dan Creswell - - * Revised iteration core to support leases and optional transaction - locking - - * Revised EntryViewAdmin to support leasing and optional transaction - locking - - * Merged tests for bulk ops, contents and visibility - - * Created configs for JINI 2.1 and 2.0 - - * Add preferred-list to dljar target in build.xml - - * Released 1.13-pre7 - -2005-09-09 Dan Creswell - - * Added bulk take and write to SpaceImpl - - * Added visibility/availability to SpaceImpl - - * Added remote interfaces for JavaSpace05 support - -2005-09-06 Dan Creswell - - * Fix race condition which could cause TxnPinger to abort a transaction - that was just committed. - - * Internally Released 1.13-pre6 - -2005-09-02 Dan Creswell - - * Make FindEntryOpInfo aggressively sync Entry deletion in cases where - the EntrySleeveImpl is on disk. This ensures better performance in - cases where we have to hit disk often such as swapping, cold-start - or FIFO. - - * Released 1.13-pre5 - - * Fix bug where transaction pinger might encounter - UnknownTransactionException for a transaction just committed and - then succeed with an abort thus erroneously undoing the transaction. - -2005-08-30 Dan Creswell - - * Refactor oid package to remove external dependency on UIDImpl. - Masking this makes it easier to introduce a new oid type as required for - fault tolerance. - - * Internally Released 1.13-pre4 - -2005-08-24 Dan Creswell - - * Added optional txn status checker which will detect transaction - manager death and abort associated transactions. Configured with - variable txnPingInterval as an interval in ms. - - * Display the codebase URL for a written Entry when dumping persistent - logs - -2005-08-10 Dan Creswell - - * Clean up some documentation re: JINI 2.1 - - * Update activation configuration - - * Released 1.13-pre3 - -2005-08-05 Dan Creswell - - * Revise persistent logger to use RandomAccessFile in sync mode which - is slightly faster than forced sync's via Channel. Note that buffer - size for the logger becomes a significant tuning factor and should be - sized to hold all concurrent transaction state at each log write. - -2005-07-22 Dan Creswell - - * Added support for logging failed takes and reads for use with - log dump tool. - - * Added versioning to Blitz log files - - * Added support for upgrade from 1.12 or less - - * Removed LoggableAction interface and support. Converted all code to - use of TxnOp which reduces duplication, increases generic code and - prepares the way for fault tolerance (fault tolerance preparation). - - * Associate lease renewals against Entry's under a write lock with - the transaction holding the lock rather than emitting them as - independent records (fault tolerance preparation). - -2005-07-21 Dan Creswell - - * Add support for emitting user data as part of a checkpoint snapshot - - * Add support for logging instance count summaries to checkpoint - snapshots and into the log files for use by log dumping tool and - associated analyzers. - - * Added a rudimentary command-line based monitoring tool which some - may prefer to dashboard - -2005-07-19 Dan Creswell - - * Added IOStat to provide statistics from the WriteDaemon. - - * Fix bug where FIFOAllocator might not correctly initialize. - - * Default write throttle to off. - - * Added documentation for log dumping tool - - * Released 1.12 - -2005-07-18 Dan Creswell - - * Reduce span of Db Txns in SpaceImpl - - * Released 1.11 - -2005-07-17 Dan Creswell - - * Make DumpEntries correctly initialize Disk before attempting to - scan. - - * Fix a problem where CacheIndexers weren't always notified of Entry - deletions leading to poor in-cache performance. - -2005-07-15 Dan Creswell - - * Fix a deadlock around TxnLocks which occurs under high load when - task bounds have been hit - -2005-07-14 Dan Creswell - - * Revise documentation to include new tools. Split out configuration - variables into sections and improved layout. - - * Revised output format of log dumping tool to be more parser friendly. - -2005-07-13 Dan Creswell - - * Convert an errant System.out to a Logger.log - - * Add support for manual triggering of lease reaping to complement - passive and automatic modes. Enabled by setting the relevant reap - time to LeaseReaper.MANUAL_REAP - - * Add a new tool, RequestReap to remotely trigger a manual lease reap. - -2005-06-30 Dan Creswell - - * Add more support for log dumping tool. In particular support more - of the possible records types. - - * Add a write queue throttle to prevent memory exhaustion and/or - overload. - - * Add more configuration settings for managing Db. - - * Improve recovery progress feedback. - - * Make sure we explicitly buffer logs we read during recovery. - -2005-06-27 Dan Creswell - - * Released 1.10 - -2005-06-26 Dan Creswell - - * Fix bug where transactions finalized in the commiting/aborting thread - caused deadlock owing to attempts to re-acquire mutex. - -2005-06-23 Dan Creswell - - * Fix lock conflict caused by parallel database existence tests and - database creation (workaround for a Db issue). - -2005-06-20 Dan Creswell - - * Make non-wildcard searches terminate immediately we determine there - cannot be a match. - - * Reduce de-serialization in searches - - * Reduce de-serialization in handling of recent writes - -2005-06-15 Dan Creswell - - * Add initial support for log dumping tool - good for debugging - both blitz and applications - see exactly what happened during a - run. - -2005-06-03 Dan Creswell - - * Fix database naming conflict caused by naming an Entry field meta - - * Released 1.09 - -2005-05-30 Dan Creswell - - * Change CacheIndexer default log level - - * Added ignoreLogConfig configuration variable to cause Blitz to ignore - logger Level configuration entry's in it's configuration file. This - allows a developer to use the standard logger configuration approach - when appropriate. - -2005-04-04 Dan Creswell - - * Fix WriteEntryOpInfo to markDirty committed entries if they are - not marked dirty when unpinned. If they are pinned they can't have - been written to disk yet and thus they should still be dirty but - mightn't be if they got temporarily dropped into WriteScheduler due - to cache pressure - - * Do a pre-check before executing some more costly logging statements - - * Don't bother asking for an Entry unless we're going to be able to - actually initialize an indexer with it - - * Tune Db/Java to handle swapping better - - * Add a static serialVersionUID to DashboardUI::Factory to avoid - problems with differences in Inca X releases - - * Optimize swapping in transient mode - - * Released 1.08 - -2005-03-31 Dan Creswell - - * Fix a bug where transaction locks might be released prematurely - at commit/abort - -2005-03-21 Dan Creswell - - * Lower layers of blitz.entry can end up with CacheIndexer's full of - DELETED Entry's which are wasted matches. Fix CacheIndexers to ignore - such Entry's - -2005-03-15 Dan Creswell - - * Added support for per-Entry type constraints. See - org.dancres.blitz.config.EntryConstraint - - * Added CacheSize constraint to override the global cache setting - and set a cache size for a specific Entry type. This replaces the - old mechanism for setting Entry specific cache size - update your - .config's accordingly - - * Added Fifo constraint to enforce FIFO ordering in searches and - writes for a specific Entry type. - - * Added support for Entry browsing to Dashboard - contributed - by Phil Bishop at Inca X - - * Released 1.07 - -2005-03-08 Dan Creswell - - * Make StartDashboard's timeout configurable via system property. - To override the default timeout, specify -DmaxDiscover= - - * Released 1.06 + * Add an optimistic log file batcher - disabled by default + - To enable change: storageModel = new Persistent(true, true, 1, true, 10000, 32768); + to: storageModel = new Persistent(true, true, 1, false, 10000, 32768); -2005-03-04 Dan Creswell - - * Added disableBitmaps boolean config variable to disable bitmap - indexing if it proves un-performant or broken. - -2005-03-03 Dan Creswell - - * Added support for JavaSpaceAdmin interface as implemented by - Outrigger. This will allow appropriate space browsers to interrogate - and modify the contents of a Blitz instance. - - * Fix a bug where renew/cancel didn't manage stats correctly - -2005-03-01 Dan Creswell - - * Moved reset of stats from SleeveCache::close to - SleeveCache::deleteAll. - - * Added support for caching indexing using Bitmaps. Applicable in - situations where caches are of fixed size they are much quicker - than the equivalent HashMapIndexer whilst having similar memory - consumption in most cases. - -2005-02-19 Dan Creswell - - * Added support for remote triggering of Entry cleanup. - - * SpaceImpl::find should abort a null transaction in face of exceptions - not prepAndCommit - - * Upgraded to Db 1.7.1 - -2005-02-08 Dan Creswell - - * Fixed a nasty race condition in LockCache where an old reference - can cause invalidation of a current lock. - - * Merge support from FT for individual Entry cache sizes. - - * Released 1.05 - -2005-01-13 Dan Creswell - - * Fix a deadlock which can occur in writing Entry's with small cachesize - - * Speculative deadlock fix which might occur in updating Entry's with - small cachesize - - * Split retry/deadlock avoidance code into a framework (RetryingUpdate - and RetryableOperation) - - * Use deadlock avoidance framework in various parts of EntryStorage - - * Relax isolation levels on disk-based tuple scans. Reduces lock - conflicts, lock demands and increases concurrency. Also yields a - performance improvement even in cache-restricted cases. - - * Big thanks to Dylan Wilson for all his testing and reporting effort - that fuelled the above changes and has resulted in a better product. - - * Fixed the release scripts to uniquely name the installer to - fix SourceForge name conflicts. - - * Released 1.04 - -2005-01-10 Dan Creswell - - * Fix a deadlock which can occur during deletion of large Entry's. - (Thanks to Dylan Wilson for a great bug report). - -2004-12-31 Dan Creswell - - * Fix a minor problem where an abort can dump a non-fatal - UnknownTransactionException during recovery. Recovery will still - complete and no damage has been done. - -2004-12-29 Dan Creswell - - * Fixed a bug in meta.Registry where initializer results were not - forcible commited to disk. - - * Released 1.03 - -2004-12-20 Dan Creswell - - * Make Blitz obey the contents of initialGroups - - * Released 1.02 - -2004-12-14 Dan Creswell - - * Make new version attributes override those in LookupStorage - - * Released 1.00 - - * Fix a deadlock between checkpointer and processing of newly - arrived Entry's being passed to blocked search tasks - (thanks to Joseph Wang for another quality bug report) - - * Released 1.01 - -2004-12-01 Dan Creswell - - * Upgraded to Db/Java 1.7.0 - - * Released 0.99 - - * Merged FieldsStat from -idev - - * Merged Entry structure stuff from -idev dashboard - -2004-11-15 Dan Creswell - - * Released 0.98 - -2004-11-14 Dan Creswell - - * Reduced -dl.jar footprint - - * Merged new rio config containing serviceui support (contributed by - Jerome Bernard) - -2004-11-05 Dan Creswell - - * Fixed dashboard to not tweak the look and feel when run as ServiceUI - -2004-11-04 Dan Creswell - - * Added a setContent(null) into ArcCache when swapping a CBD to - b1 or b2 - reduces memory footprint - -2004-10-26 Dan Creswell - - * FindEntryOpInfo should not unpin an Entry - that should only be done - by WriteEntryOpInfo. This could lead to inaccurate notify behaviour - under very rare circumstances - -2004-09-30 Dan Creswell - - * Fix bug where prepared state may not be restored correctly - during recovery - - * Release 0.97 - -2004-09-23 Dan Creswell - - * Fix a deadlock induced by checkpointing whilst an EntryRepository - is being demand loaded (thanks to Joseph Wang for a great bug report) - - * Released 0.96 - -2004-09-21 Dan Creswell - - * Fix a potential lock conflict when searches are happening whilst - WriteDaemon performs a delete - -2004-09-16 Dan Creswell - - * Fix a CacheIndexer initialization bug which can break all cache - matching and associated reads/takes. Typical symptom was an - ArrayIndexOutOfBoundsException which could be easily confused with - a false positive caused by Entry schema changes. - -2004-09-09 Dan Creswell - - * Fix silly incorrect optimization that breaks matching. - - * Released 0.94 - -2004-08-22 Dan Creswell - - * Added HostStat - - * Added new examples for EntrySizer and a simple HelloWorld - - * Added template configurations for handling large objects - - * Released 0.93 - -2004-08-21 Dan Creswell - - * Tweaked SleeveCache to not bother searching if no entry's are - present rather than hit cache and then EntryStorage - - * Added diagnostic output to CacheIndexer - - * Added ServiceUI to the list of required packages for compilation - - * Added a snapshot test (from the JSIP package - thanks to Phil and - Nige) - -2004-08-06 Dan Creswell - - * SpaceImpl::write was holding txn open way longer than it needs to. - -2004-08-05 Dan Creswell - - * Added throttling support on event and task queues to prevent - high-load from causing runaway heap consumption problems. Configured - via eventQueueBound and taskQueueBound respectively +2010-01-04 Dan Creswell - * Added support for multiple event processor threads in EventQueue - to allow for balancing between event generation (typically from writes) - and matching/dispatching as remote events. Configured via - maxEventProcessors - -2004-08-03 Dan Creswell - - * Make sure we close ObjectStreams used during (un)mangling. - This is for tidyness/robustness - doesn't seem to cause a memory leak. - -2004-08-02 Dan Creswell - - * Remove need for initialAttrs to be specified. - - * Released 0.92 - -2004-07-31 Dan Creswell - - * Added EntrySizer utility to class to assist in storage/memory - usage estimation. - -2004-07-29 Dan Creswell - - * Fix build/release to include currently linked je.jar - - * Released 0.91 - -2004-07-26 Dan Creswell - - * Merged ServiceUI support for dashboard - - * Released 0.90 - -2004-07-16 Dan Creswell - - * Revised LockMgr to use a reference queue against a standard - HashMap rather than SoftHashMap which is less efficient. - - * Merged a patch from Sleepycat to fix an errant - LogFileNotFoundException - -2004-07-15 Dan Creswell - - * Turn off lock timeouts which seem to be breaking things - under load - -2004-07-12 Dan Creswell - - * Make sure we sync on closing a log file - - * Released 0.89a - -2004-07-09 Dan Creswell - - * Don't use DelegatingBufferStream2 until it handles oversized - writes correctly - -2004-07-05 Dan Creswell - - * Fixed up some disk initialization order issues when transient - personality is active. - -2004-06-28 Dan Creswell - - * Fixed a build problem (really include je 1.5.0) - - * Released 0.89 - - * Added StartFromConfig to the dash package to permit use of - dashboard in secure configurations etc. - -2004-06-27 Dan Creswell - - * Fixed a locking problem in the txn lock manager - - * Modified prevayler to use nio a little more - - * Released 0.88 - -2004-06-23 Dan Creswell - - * Make SearchVisitorImpl cleanup it's txn listener - - * Released 0.87 - -2004-06-22 Dan Creswell - - * Fixed several try/catch and lock blocks in TxnState - - * Make sure transaction status is reflected correctly to currently - blocked reads/takes - - * Abort blocked reads/takes waiting on a resolved transaction with - a TransactionException - - * Added a tool to remotely trigger hot backup - - * Released 0.86 - -2004-06-21 Dan Creswell - - * Added experimental hot backup support accessible via BlitzAdmin - - * Fixed bug in Disk.dbExists which prevented recovery from backup - - * Fixed a checkpointing problem where not all state might have made - it to disk - - * Modified LookupStorage/Data to hold Entry attributes in a - MarshalledObject - - * Upgrade to Db/Java 1.5.0 - -2004-06-18 Dan Creswell - - * Revised checkpointing to block logging for less time. - -2004-06-15 Dan Creswell - - * Make Blitz lock it's storage location to prevent running two - instances against the same storage risking corruption. - -2004-06-14 Dan Creswell - - * Added support for an identity transaction which allows for - transaction like operations but with no logging. - -2004-06-11 Dan Creswell - - * Fixed a bug where we might join() before fully init'd - -2004-06-10 Dan Creswell - - * Made it possible to have several LeaseReaper's active, each with - their own set of Reapables and with their own sets of filters. - -2004-06-04 Dan Creswell - - * Fixed a problem with batch lease renewals - - * Fixed a broken interface which is all public but had a package - private return value. Think the compiler should've caught it. Thanks - to Karl Koster for helping with testing. - - * Released V0.85 - -2004-06-01 Dan Creswell - - * Updated Db/Java to 1.4.10 - - * Fix indexes to configure databases for duplicate support (if we don't - we loose entry's - gulp!) - - * Released V0.83 - - * Fixed a bug in the lease tracker which wasn't permitting creation - of the database from scratch. - - * Released V0.84 - -2004-05-25 Dan Creswell - - * Changed CacheLines to use IntHashMap for hashcode to Entry UID - matching - - * Revised CacheLine to use a Set rather than a Map for Ids - - * TxnLock now lazily creates the conflicts list - - * Added a new experimental concurrent batcher and marked the old - version stable - -2004-05-19 Dan Creswell - - * Make sure we close the server socket on debugger exit - - * Fix LeaseImpl::canBatch to discriminate on the space instance - responsible - - * Fix LeaseMapImpl::canContainKey to discriminate on the space instance - responsible - - * Updated ServiceLocator to allow for timeouts - - * Updated tools to use ServiceLocator timeouts - - * Released V0.82 - -2004-05-17 Dan Creswell - - * Fixed hierarchical matching bug triggered by having no enclosing - active transaction. - - * Released V0.81 - -2004-05-16 Dan Creswell - - * Initial fork/port to Db Java - - * Initial documentation revision + * Blitz Pure Java Version 2.1 - full changelog here: + http://blitzjavaspaces.hg.sourceforge.net/hgweb/blitzjavaspaces/blitzjavaspaces/log - * Released V0.8 - -2004-05-02 Dan Creswell - - * Released V2.0.5 - - * Modified SyncAndShutdown to accept spacename or lus host and - spacename as parameters - -2004-04-30 Dan Creswell - - * Merged Ussama Baggili's changes to allow dashboard to discover a - blitz instance via unicast or multicast discovery. - -2004-04-29 Dan Creswell - - * TxnLock stuff moved to txnlock package - - * Fixed some txnlock state visibility issues - - * Removed unnecessary dirtying of cache block descriptors in - WriteEntryOpInfo - - * Modified CacheListener and ArcCache to make dirtying information - available to allow CacheIndexer to better manage search candidates. - - * Cleared out the old deletion hinting from TupleLocator impls. - - * Added BlockingOpsStat to track current number of blocking reads - and takes - - * Updated dashboard to display additional blocking stats - -2004-04-28 Dan Creswell - - * Fixed a NullPointerException problem in Disk.deleteFiles - - * Added caches for parents and fields to EntryMangler to accelerate - mangling and unmangling - -2004-04-27 Dan Creswell - - * Added some caching of marshalled txn mgrs to remove repeated - conversion into MarshalledObjects. - -2004-04-26 Dan Creswell - - * Released V2.0.4 - -2004-04-22 Dan Creswell - - * Fixed race condition where client's could be performing transactional - operations before join was complete. - -2004-04-13 Dan Creswell - - * Added an experimental solution to keep stats up-to-date in the face - of lease expiry - still not 100% timely - -2004-04-08 Dan Creswell - - * Tweaked the hash-code algorithm for UIDImpl to reduce collisions - -2004-04-06 Dan Creswell - - * Modified DumpEntries to compute how many entries were ignored due - to their lease being expired - -2004-04-04 Dan Creswell - - * Released V2.0.3 - - * Fix stupid bug in Null txn initializer - -2004-04-02 Dan Creswell - - * Released V2.0.2 - - * Revised documentation to cover dashboard, SyncAndShutdown - and DumpEntries - - * Merged dashboard source code from Inca X - -2004-04-01 Dan Creswell - - * Added SyncAndShutdown and DumpEntries tools - -2004-03-30 Dan Creswell - - * Blitz shouldn't bother saving local transaction manager in log - records - - * Added logger output to announce active storage personality - - * Modified cache usage to allow for aging of entry's that are about - to be taken - -2004-03-29 Dan Creswell - - * Fixed lease expiry initialization bug in write() and notify() - -2004-03-26 Dan Creswell - - * Fixed a bug in the CacheLine hint handling code where it assumed - that the UID to be demoted would always be in the cache at the - time - - * Revised admin documentation to cover shutdown/destroy configuration - -2004-03-24 Dan Creswell - - * Added configuration variable (compliantDestroy) to enable/disable - erasing of state when destroy is invoked (after discussion with - John McClain) - - * Added a shutdown method which can be used to stop Blitz without - erasing state regardless of the compliantDestroy variable's state - -2004-03-23 Dan Creswell - - * Fixed Blitz to load join management aspects from config file if - the user defines it - - * Added rule (jars) to build.xml for compiling and building just - the .jars with no generation of javadoc etc - -2004-03-21 Dan Creswell - - * Improved performance of snapshot - - * Fixed several performance "dark-corners" in CacheIndexer - -2004-03-15 Dan Creswell - - * Fixed a bug where non-critical WriteDaemon threads were not being - shutdown cleanly causing Blitz to sometimes fail to exit immediately - -2004-03-14 Dan Creswell - - * Cleaned up stats handling in entry package. Moved stats updates - into OpInfo instances. Split accounting/stats generation into - CounterImpl - - * Added stat to track Entry count plus associated switch - - * Expanded stats client example - - * Added additional helper methods to TypesStat and OpStat - - * Documentation updated to reflect new stats - -2004-03-13 Dan Creswell - - * Modified ConfigAssistant to print a general note about configuring - persistent directories in addition to the OS-specific instructions. - (Suggested by Ussama Baggili) - - * Added a stat which provides information about the current number - of active transactions Blitz is handling - - * Reworked stats package separating out the stats generation/creation - role from the stats presentation role - -2004-03-11 Dan Creswell - - * Fixed a bug in Blitz's prepareAndCommit implementation where - the wrong state could be returned - - * Fixed a bug where TransientPersonality might delete currently active - files leaving to bad shutdown - -2004-03-03 Dan Creswell - - * Released V2.0.1 - - * Fixed bug in OID Allocation which could cause recovery problems - should initial setup fail before completion - - * Fixed bug where EventQueue could be interrupted whilst updating - event generator sequence numbers as part of restart - - * Cleaned up Registry API by splitting methods into RegistryAccessor - - * Fixed bug where not all cached entries were being considered for - wildcard match - - * Added pdf file explaining how to use Blitz in embedded mode - -2004-02-24 Dan Creswell - - * Added BlitzAdmin interface - - * Added ability to trigger checkpoint remotely via BlitzAdmin - -2004-02-19 Dan Creswell - - * Fixed Blitz to invoke ActivationGroup::inactive() during destroy() - to ensure garbage collection is performed and classloaders are - dumped - -2004-02-04 Dan Creswell - - * Released V2.0.0 - - * Added support for Db 4.2 - - * Added ConfigGuide, a tool to assist in initial setup/installation - of Blitz - - * Renamed ConfigGuide to ConfigAssistant - - * Updated tuning guide, install notes etc - -2004-02-03 Dan Creswell - - * Introduced BootContext which allows components to be aware of various - bits of boot-time information for purposes of recovery etc - - * Implemented a BootInfo instance, UnsyncdOps, which is added to - BootContext to advise components of the maximum number of log ops - that may have accrued since the last sync/checkpoint - - * Modified AllocatorImpl to use UnsyncdOps for resync'ing of oid - allocators. Removes the need for user code to be involved in the - allocator recovery process - - * Added rules to allow building/release of binaries for Db4.1 and - Db4.2 - -2004-02-02 Dan Creswell - - * Implemented BufferingPrevaylerImpl - - * Implemented TimeBarrierPersistent and TimeBarrierPersonality which - allows trading of persistence QoS against speed - - * Implemented automatic log cleanup. Experimental for now so it can - be configured off through the appropriate StorageModel's - -2004-01-28 Dan Creswell - - * Separated the checkpointing code out of TxnManager and made it - abstract to allow easier changes in policy - - * Added support for storage personality's/models - - * Moved the persistence initialization out of TxnManager and into - Persistent storage model - - * Implemented NullPrevayler to allow for log-less operation - - * Implemented NeverTrigger to allow for checkpoint-less operation - - * Create Transient storage model which makes Blitz act like a - disk-backed cache - -2004-01-24 Dan Creswell - - * Added DebugILFactory which allows a programmer to insert a custom - invocation layer into Blitz's endpoint stack - - * Added TimingInvocationHandler which logs the duration of a remote - call to console and can be configured into the remote stack via - DebugILFactory - -2004-01-22 Dan Creswell - - * Added experimental support for concurrent log write batching where - one batch can be written to disk whilst another is forming - - * Added support for a log buffer. Allows for all writes in a batch - to be rendered into a buffer and block written to disk for better - throughput - -2004-01-20 Dan Creswell - - * Released V1.1.4 - - * Fixed an incorrect configuration variable reference: dbCache - - * Added config option to allow setting of max simultaneous Db txn's - - * Fixed TxnManagerState to correctly save/load it's clock state - - required during recovery - - * Fixed a checkpoint bug which sometimes resulted in a lost entry. - SyncFinalizer now invokes txn_checkpoint with Db.DB_FORCE - -2004-01-20 Dan Creswell - - * Added integrity checking - - * Added logging for LoginContext.login() failures - -2004-01-15 Dan Creswell - - * Tweaked code to compile under JDK 1.5 - includes some code in - Debugger to perform programmatical stack dumps - -2004-01-13 Dan Creswell - - * Released V1.1.3 - - * Updated some Javadoc - - * Updated documentation - - * Changed org.dancres.blitz.Logging to force use of a predefined - ConsoleHandler which fixes a problem with losing logging messages with - a level less than INFO - -2004-01-12 Dan Creswell - - * Moved PINNED EntrySleeve handling into WriteScheduler - - * MEMORY_ONLY became PINNED - - * Fixed deadlock in WriteBuffer (TxnStress strikes again) - - don't hold locks across I/O! - - * Rewrote WriteBuffer to better consolidate writes and reduce load - on WriteDaemon - -2004-01-11 Dan Creswell - - * Fixed WriteDaemon to correctly handle a desiredPendingWrites value - of 0 - - * Added a MemoryStat to track maximum available and current memory - usage - -2004-01-08 Dan Creswell - - * Fixed a deadlock by making EntryStorage::load use non-blocking - disk transactions - - * Added non-blocking disk transactions - - * Modified LocalSpace to support full transactional operations. - Provides embedded space capability - - * Added Debugger tool. See org.dancres.blitz.Debugger - - * Created TxnStress to thrash Blitz. It worked, found a deadlock! :( - -2004-01-05 Dan Creswell - - * Released V1.1.2 - - * Fixed a deadlock. Rarely happens as it requires a particular step - in checkpoint to happen at exactly the same time as a del of an - EntrySleeve from an index. Both the checkpoint and the del must - hit the same page at pretty much the same time and in one particular - order - -2004-01-04 Dan Creswell - - * Revised lease handling code. Fixed a bug in the lease bounding - for entries where we weren't searching for the correct config value. - Much cleaner now - - * Released V1.1.1 - - * Replaced use of ":" in .config files with - System.property("path.separator") to be more cross-platform. Thanks - to Olaf Bergner for this suggestion - -2004-01-02 Dan Creswell - - * Added a tuning guide - - * Various documentation tweaks - -2003-12-17 Dan Creswell - - * Released V1.1.0 - - * Recovery of oid allocation simplified - - * Notify registration recovery rewritten to allow full recovery from - log files alone - -2003-12-16 Dan Creswell - - * Released v1.0.2 - - * Support for dumping of useful disk performance statistics - - * Removed excessive log flushing - -2003-12-15 Dan Creswell - - * Released v1.0.1 - - * Fixed bug in checkpointing where checkpoint record was written before - all buffers were flushed - -2003-12-12 Dan Creswell - - * Released v1.0 - initial code drop - + * Update to DB/Java 3.3.93 + * Add an additional option on Dashboard to display full stats as raw +strings. + * Add some cache/memory statistics to help spot potential exhaustion +and other tuning issues. + * Add support for cache partitioning to improve concurrency. + * Add support for nano-second batch windows. diff -r 243c74d599bf -r a77f0a9ed93c src/org/dancres/blitz/VersionInfo.java --- a/src/org/dancres/blitz/VersionInfo.java Sat Jun 12 10:41:47 2010 +0100 +++ b/src/org/dancres/blitz/VersionInfo.java Sat Jun 12 10:42:31 2010 +0100 @@ -8,7 +8,7 @@ public static final String PRODUCT_NAME = "Blitz JavaSpaces (PureJavaEdition)"; public static final String EMAIL_CONTACT = "blitz@dancres.org"; public static final String SUPPLIER_NAME = "The Blitz Project"; - public static final String VERSION = "2.1"; + public static final String VERSION = "2.1.1"; public static void dump() { SpaceImpl.theLogger.log(Level.INFO, "Version info: " + diff -r 243c74d599bf -r a77f0a9ed93c src/org/dancres/blitz/config/Persistent.java --- a/src/org/dancres/blitz/config/Persistent.java Sat Jun 12 10:41:47 2010 +0100 +++ b/src/org/dancres/blitz/config/Persistent.java Sat Jun 12 10:42:31 2010 +0100 @@ -8,7 +8,7 @@ */ public class Persistent extends PersistentBase { - private boolean useConcurrentBatcher; + private boolean dontUseExpLog; private long theBatchWriteWindowSizeMs; private int theBatchWriteWindowSizeNs; @@ -28,8 +28,8 @@ entering the barrier are now blocked until the first entrant commits all writes to log. - @param useConcurrent should increase log throughput by allowing the - next batch to form whilst the current batch is being written to log. + @param noUseExpLog avoid using optimistic logger which should increase log throughput + by allowing an optimistic flushing strategy but may still contain bugs @param aMaxLogsBeforeSync is the maximum number of log entries before a checkpoint is forced. @@ -40,16 +40,16 @@ small update which isn't good for throughput! */ public Persistent(boolean shouldReset, boolean shouldClean, - int aBatchWriteWindowSize, boolean useConcurrent, + int aBatchWriteWindowSize, boolean noUseExpLog, int aMaxLogsBeforeSync, int aLogBufferSize) { super(shouldReset, shouldClean, aLogBufferSize, aMaxLogsBeforeSync); - useConcurrentBatcher = useConcurrent; + dontUseExpLog = noUseExpLog; theBatchWriteWindowSizeMs = aBatchWriteWindowSize; } - public boolean useConcurrentWriteBatcher() { - return useConcurrentBatcher; + public boolean dontUseExperimentalBatcher() { + return dontUseExpLog; } public long getBatchWriteWindowSizeMs() { @@ -61,11 +61,11 @@ } public Persistent(boolean shouldReset, boolean shouldClean, - long aBatchWindowSizeMs, int aBatchWindowSizeNs, boolean useConcurrent, + long aBatchWindowSizeMs, int aBatchWindowSizeNs, boolean noUseExpLog, int aMaxLogsBeforeSync, int aLogBufferSize) { super(shouldReset, shouldClean, aLogBufferSize, aMaxLogsBeforeSync); - useConcurrentBatcher = useConcurrent; + dontUseExpLog = noUseExpLog; theBatchWriteWindowSizeMs = aBatchWindowSizeMs; theBatchWriteWindowSizeNs = aBatchWindowSizeNs; } diff -r 243c74d599bf -r a77f0a9ed93c src/org/dancres/blitz/txn/PersistentPersonality.java --- a/src/org/dancres/blitz/txn/PersistentPersonality.java Sat Jun 12 10:41:47 2010 +0100 +++ b/src/org/dancres/blitz/txn/PersistentPersonality.java Sat Jun 12 10:42:31 2010 +0100 @@ -34,9 +34,9 @@ TxnManager.theLogger.log(Level.INFO, "Write barrier window: " + theModel.getBatchWriteWindowSizeMs() + ", " + theModel.getBatchWriteWindowSizeNs()); - if (theModel.useConcurrentWriteBatcher()) + if (!theModel.dontUseExperimentalBatcher()) TxnManager.theLogger.log(Level.INFO, - "*** Concurrent batching enabled ***"); + "*** Experimental batcher enabled ***"); if (theModel.shouldCleanLogs()) { TxnManager.theLogger.log(Level.WARNING, @@ -70,10 +70,10 @@ long myWindowSizeMs = theModel.getBatchWriteWindowSizeMs(); int myWindowSizeNs = theModel.getBatchWriteWindowSizeNs(); - if (theModel.useConcurrentWriteBatcher()) { + if (theModel.dontUseExperimentalBatcher()) { return new ConcurrentWriteBatcher(myPrevayler, myWindowSizeMs, myWindowSizeNs); } else { - return new WriteBatcher(myPrevayler, myWindowSizeMs, myWindowSizeNs); + return new OptimisticBatcher(myPrevayler); } } else return new NullBatcher(myPrevayler); diff -r 243c74d599bf -r a77f0a9ed93c src/org/dancres/blitz/txn/batch/OptimisticBatcher.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/dancres/blitz/txn/batch/OptimisticBatcher.java Sat Jun 12 10:42:31 2010 +0100 @@ -0,0 +1,157 @@ +package org.dancres.blitz.txn.batch; + +import org.prevayler.Command; +import org.prevayler.PrevalentSystem; +import org.prevayler.implementation.PrevaylerCore; +import org.prevayler.implementation.SnapshotPrevayler; +import org.prevayler.implementation.Snapshotter; + +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.concurrent.atomic.AtomicInteger; + +public class OptimisticBatcher implements SnapshotPrevayler { + private PrevaylerCore _prevayler; + private boolean _writing = false; + private ArrayList _writes = new ArrayList(); + + // private AtomicInteger _inCount = new AtomicInteger(); + // private AtomicInteger _outCount = new AtomicInteger(); + + public OptimisticBatcher(PrevaylerCore aPrevayler) { + _prevayler = aPrevayler; + } + + public PrevalentSystem system() { + return _prevayler.system(); + } + + public Serializable executeCommand(Command aCommand) throws Exception { + return write(aCommand, true); + } + + public Serializable executeCommand(Command aCommand, boolean sync) + throws Exception { + return write(aCommand, sync); + } + + private Serializable write(Command aComm, boolean sync) throws Exception { + boolean someoneWriting = false; + WriteRequest myReq = null; + + synchronized(this) { + someoneWriting = _writing; + + // If someone is already writing, we add to their queue of work + // + if (_writing) { + myReq = new WriteRequest(aComm); + _writes.add(myReq); + } else { + _writing = true; + } + } + + // If we are waiting on someone's queue + // + if (someoneWriting) { + // If we want to wait until the log is flushed + // + if (sync) + myReq.await(); + + return aComm.execute(_prevayler.system()); + } else { + // We are handling the write queue, write our stuff now + // + _prevayler.logCommand(aComm, false); + + ArrayList myAllWrites = new ArrayList(); + + // While there other writes scoop them up and write them + // + ArrayList myBuffer = new ArrayList(); + + while (haveWrites()) { + synchronized(this) { + myBuffer.clear(); + myBuffer.addAll(_writes); + _writes.clear(); + } + + Iterator myWrites = myBuffer.iterator(); + while (myWrites.hasNext()) + _prevayler.logCommand(myWrites.next().getCommand(), false); + + myAllWrites.addAll(myBuffer); + } + + // Now dispatch execution of all logged commands - execute our own first + // + try { + return aComm.execute(_prevayler.system()); + } finally { + Iterator myTargets = myAllWrites.iterator(); + while (myTargets.hasNext()) { + // _outCount.incrementAndGet(); + myTargets.next().dispatch(); + } + + // System.out.println("Logger: incount = " + _inCount + " outcount = " + _outCount); + } + } + } + + private boolean haveWrites() throws Exception { + synchronized(this) { + if (_writes.size() > 0) + return true; + else { + _writing = false; + _prevayler.flush(); + + return false; + } + } + } + + public Snapshotter takeSnapshot() throws IOException { + return _prevayler.takeSnapshot(); + } + + private class WriteRequest { + private Command _comm; + private Object _lock = new Object(); + private boolean _exit = false; + + WriteRequest(Command aComm) { + // _inCount.incrementAndGet(); + _comm = aComm; + } + + Command getCommand() { + return _comm; + } + + void dispatch() { + synchronized(_lock) { + _exit = true; + _lock.notify(); + } + } + + void await() { + synchronized(_lock) { + while (! _exit) { + try { + _lock.wait(); + } catch (InterruptedException anIE) { + + } + } + } + } + } +} diff -r 243c74d599bf -r a77f0a9ed93c src/org/prevayler/implementation/CommandOutputStream.java --- a/src/org/prevayler/implementation/CommandOutputStream.java Sat Jun 12 10:41:47 2010 +0100 +++ b/src/org/prevayler/implementation/CommandOutputStream.java Sat Jun 12 10:42:31 2010 +0100 @@ -88,6 +88,11 @@ } } + public void flush() throws IOException { + ObjectOutputStream oos = logStream(); + oos.flush(); + } + public void writeCommand(Command command, boolean doSync) throws IOException{ diff -r 243c74d599bf -r a77f0a9ed93c src/org/prevayler/implementation/PrevaylerCore.java --- a/src/org/prevayler/implementation/PrevaylerCore.java Sat Jun 12 10:41:47 2010 +0100 +++ b/src/org/prevayler/implementation/PrevaylerCore.java Sat Jun 12 10:42:31 2010 +0100 @@ -148,6 +148,12 @@ } } + public void flush() throws IOException { + synchronized(this) { + output.flush(); + } + } + /** * This method prepares a snapshot of the system and returns it in a * Snapshotter instance which can be used to save the snapshot to disk