-
Notifications
You must be signed in to change notification settings - Fork 483
Document Chronicle Map architecture & system properties; tidy APIs, quality rules, and tests #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
peter-lawrey
wants to merge
19
commits into
develop
Choose a base branch
from
adv/develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… in documentation
…sting strategy documentation for Chronicle Map
…necessary comments, adjusting variable declarations, and cleaning up whitespace across multiple files.
… final where applicable and cleaning up method signatures across multiple files.
…d clarity and consistency
…or read and write operations
…service calls for consistency
…bleArray; clean up pom.xml
|
james-mcsherry
approved these changes
Nov 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


This PR is primarily documentation, quality, and test clean-up work for Chronicle Map, with only very minor behavioural changes. It introduces explicit architectural/requirements docs, documents key system properties, relaxes some Checkstyle rules for legacy tests, and upgrades the BOM.
Functional changes
These are the changes that could affect runtime behaviour or public APIs.
JSON import/export now uses NIO streams
JsonSerializer.createInputStream(...)andcreateOutputStream(...)now useFiles.newInputStream(...)/Files.newOutputStream(...)instead ofFileInputStream/FileOutputStream.Constructor / API exception signatures simplified
ReplicatedChronicleMap(ChronicleMapBuilder<K,V>)no longer declaresthrows IOException; the implementation did not actually throw checked I/O in normal construction. Callers no longer need to handleIOExceptionat construction time.FindByName.from(String)now only declaresIllegalArgumentException, removingIOException,TimeoutException, andInterruptedExceptionfrom the signature. Implementations and call-sites in this module were already not relying on those checked exceptions.Small behavioural tweaks in test/demo utilities
CHMLatencyTestMainand the “dirty read” lock examples) now useThread.yield()or similar instead of pure empty spin loops. This reduces CPU burn in those harnesses but does not affect the core Chronicle Map runtime behaviour.assertEquals/assertNull/assertSameetc. in ways that more precisely assert the intended behaviour (for example,ChronicleMapEqualsTest,MapCloseTest).No intentional changes were made to the Chronicle Map data structures, locking algorithms, on-disk format, or replication semantics.
Non-functional changes
Documentation & AsciiDoc structure
Project-wide AsciiDoc attributes
Added
:lang: en-GBand:source-highlighter: rougeto:ReadMe.adocbenchmark/README.adocdocs/CM_*.adocsrc/main/docs/*.adocAligns docs with Chronicle’s house style and consistent syntax highlighting.
Typo and wording fixes
benchmark/README.adoc: “Corsair MP600 driver” → “Corsair MP600 drive”.==== 1. Data rate→==== Data rate).New system properties reference
New
docs/systemProperties.adocdescribing Chronicle Map system properties, including:chronicle.map.creation.debugchronicle.map.file.lock.timeout.secschronicle.map.sparseFilechronicle.map.disable.lockingnet.openhft.chronicle.map.lockTimeoutSecondsCaptures default values, behaviour, and associated internal variables (e.g.
MAP_CREATION_DEBUG,FILE_LOCK_TIMEOUT).New architecture and compliance documents
Added a Chronicle Map documentation spine under
src/main/docs/:architecture-overview.adocdecision-log.adocComponent-specific ADRs using the
<Scope>-<Tag>-NNNpattern withMAP-*identifiers, e.g.:MAP-FN-101 Off-heap Segmented Hash Map DesignMAP-NF-O-201 Sizing and Capacity Configuration Via Builderproject-requirements.adocInitial
MAP-*requirements catalogue:MAP-FN-001–003for core map operations, persistence, and builder usage.MAP-NF-P-*), operability (MAP-NF-O-*), and security (MAP-NF-S-*) skeletons.EntryCountMapTest,BasicReplicationTest,HugeSparseMapTest).testing-strategy.adocMAP-*requirements.CHMLatencyTestMain,PageLatencyMain) versus regular CI runs.Build, quality and tooling
BOM upgrade
Root
pom.xml:net.openhft:third-party-bomupgraded from3.27ea5to3.27ea7.This may pull in newer third-party dependency versions (logging, XStream, etc.); runtime behaviour is expected to stay compatible but this change should be watched in CI and downstream builds.
Javadoc plugin cleanup
-Xdoclint:nonefrom themaven-javadoc-pluginconfiguration.Checkstyle suppressions for legacy test/example code
checkstyle-suppressions.xmlexpanded to suppressCommentsIndentationand/orVariableDeclarationUsageDistancefor a number of older tests and examples (e.g.DirtyRead*,CHMUseCasesTest,LargeEntriesTest,MarshallableReaderWriterTest, etc.).Code quality and refactoring (no intended behaviour change)
Core implementation clean-ups
Marked several fields as
finalwhere they are never reassigned (e.g. iterator fields,startTime, test constants).Removed unused imports and unused fields (e.g.
ByteBufferDataAccess,WrappedValueBytesData.cachedWrappedValueRead).Tidied lengthy generated classes (
CompiledMapIterationContext,CompiledMapQueryContext,CompiledReplicated*) by:switchstyle.((T) ...)) and returns.These changes are purely structural/readability improvements; logic paths and state transitions are preserved.
Safer / clearer I/O usage
FileLockUtilTestandChronicleMapImportExportTestnow useFiles.newInputStream/newOutputStreamand localise some variables, improving clarity and resource handling in tests.Test suite modernisation
Many tests:
throws IOException, InterruptedException, ...) where not needed.assertNull,assertSame,assertNotEquals,assertArrayEquals).ENTRIES,ENTRY_SIZEconstants in large-entry tests).fail()with JUnit 5Assertions.fail()where appropriate.ParallelStartupTestnow uses JUnit 5@RepeatedTestandAssertions.assertEqualsfor clarity.Numerous examples/tests have minor readability improvements (renamed methods like
_test()→runTest()/runPerformanceIteration(), simplified interfaces, removed redundantpublicmodifiers).Utility and example tweaks
ProcessInstanceLimiter:FileSystems.getDefault().getSeparator()instead ofSystem.getProperty("file.separator")for the default map path.Many example interfaces (
PortfolioAssetInterface,DemoOrderVOInterface,MyFloats, etc.) simplified by removing redundantpublicqualifiers and using final fields where appropriate.Notes / risks
JsonSerializer, but this is expected to be transparent.3.27ea7may affect transitive dependency versions; downstream users should watch their dependency trees and runtime logs for subtle changes.