-
Notifications
You must be signed in to change notification settings - Fork 562
Architecture docs and small robustness fixes for Chronicle Queue #1689
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
27
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
…d exiting with status
…ability in multiple files
…oreTailer classes
… in 2027, to indicate they are only used in tests.
james-mcsherry
approved these changes
Nov 28, 2025
… lock acquisition and ensure proper pauser reset
|
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 mostly documentation and developer-experience focused:
CLAUDE.md,GEMINI.md) so agents interact safely and correctly with this repo.architecture-overview.adoc,decision-log.adoc,project-requirements.adoc,security-review.adoc,testing-strategy.adoc.3.27ea7.Along the way, a few small but real behavioural/functional changes were made — these are called out explicitly below.
Functional / Behavioural Changes
1. CLI and help output now explicitly use UTF-8
Changed:
ChronicleHistoryReaderMain.printHelpAndExit(...)ChronicleReaderMain.printHelpAndExit(...)internal.writer.ChronicleWriterMain.printHelpAndExit(...)internal.main.InternalDumpMain.dump(...)Behavioural impact:
OutputStreamWriter(..., StandardCharsets.UTF_8)rather than the platform default encoding.Breaking risk: low – only affects console encoding; content is the same, just consistently UTF-8.
2. Index checking flag is now final + configurable via helper
Changed:
QueueSystemProperties:public static boolean CHECK_INDEX→public static final boolean CHECK_INDEX = checkIndex();New internal state:
private static volatile boolean checkIndexEnabled.New methods:
public static boolean checkIndex()public static void setCheckIndex(boolean enabled)Call sites now use
QueueSystemProperties.checkIndex()in assertions rather than accessing a mutable static field directly.Behavioural impact:
Semantics at runtime are unchanged by default:
CHECK_INDEXstill reflects thequeue.check.indexsystem property at startup.Tests (and tooling) can temporarily override index-check behaviour via
QueueSystemProperties.setCheckIndex(boolean)rather than mutating a public static field.Breaking risk: very low – the constant remains; only code that mutated
CHECK_INDEXdirectly is now broken and should be switched tosetCheckIndex(...).3. Better directory handling and warnings in
SingleChronicleQueue/ builderChanged:
SingleChronicleQueueconstructor:On init, if
builder.readOnly()is false and the target path does not exist:path.mkdirs()and logs a warning viaJvm.warnif the directory still does not exist.SingleChronicleQueueBuilder.builder(File file, WireType wireType):If the supplied
file.toString()is""(empty string):new File(".")as the base path.SingleChronicleQueueBuilder.metapath():QUEUE_METADATA_FILE, usespath.mkdirs()and logs a warning if it cannot create the directory.Behavioural impact:
IOException.new File("")becomes explicit and noisy, nudging them towards a dedicated queue directory.Breaking risk: low – previously this was largely silent; now you get safer behaviour plus extra logging.
4. Safer OS/file APIs and fallbacks
Changed:
InternalFileUtil.state(File):Previously assumed
getAllOpenFilesIsSupportedOnOS()and would throwUnsupportedOperationExceptionon unsupported OSes if misused.Now:
getAllOpenFilesIsSupportedOnOS()isfalse, it falls back tostateWindows(file).SingleChronicleQueue.dump()debug block (Linux):/proc/self/mapsis now read usingStandardCharsets.UTF_8.Behavioural impact:
state(File)no longer surprises callers withUnsupportedOperationExceptionon non-Linux platforms; it delegates to the Windows-specific implementation where needed.Breaking risk: very low – behaviour becomes more consistent across platforms.
5. Tailer direction sanity check and store accessor contract
Changed:
StoreTailer.incrementIndex():switch (direction)now has adefaultcase that throwsIllegalStateException("Unsupported direction " + direction)instead of doing nothing if an unknown direction appears.StoreTailer.store():@Nullable(behaviour unchanged; just acknowledges that it may returnnullif no store is active).Behavioural impact:
Breaking risk: low – this will only surface if external code has been feeding invalid
TailerDirectionvalues into the tailer.6. Miscellaneous small behaviour/robustness tweaks
MicroToucher:Throwableduring page touching with a comment, clarifying that pretouching is a best-effort optimisation.AbstractTSQueueLock.toString():tableStoreintoString(), improving logging/debugging.ChronicleReader.asMethodReader(String):entryHandlerFactoryis set correctly when a non-empty interface name is supplied; the dummy handler is only used when the name is empty.ChronicleHistoryReader.printPercentilesSummary():ChronicleHistoryReaderMain,ChronicleReaderMain,ChronicleWriterMain:ChronicleWriterMainalso writes an error message tostderrwhen exiting due to invalid arguments.Non-functional / Docs / DX Changes
These are non-functional from the queue’s point of view but worth noting:
New LLM agent guides:
CLAUDE.md– detailed repo guide for Claude Code (build commands, queue lifecycle, architecture, performance knobs).GEMINI.md– high-level Chronicle Queue overview and build/run notes for Gemini.New architectural and process docs:
src/main/docs/architecture-overview.adocsrc/main/docs/decision-log.adocsrc/main/docs/project-requirements.adocsrc/main/docs/security-review.adocsrc/main/docs/testing-strategy.adocDocs normalisation:
:lang: en-GBand:source-highlighter: rougeconsistently.µsin latency/benchmark sections.docs/antora/modules/demos/pages/demos.adoc.Dependencies:
net.openhft:third-party-bomupgraded3.27ea5 → 3.27ea7.