Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ReadMe.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Chronicle Software
:css-signature: demo
:toc: macro
:toclevels: 2
:icons: font
:lang: en-GB
:source-highlighter: rouge

image:https://maven-badges.herokuapp.com/maven-central/net.openhft/chronicle-map/badge.svg[caption="",link=https://maven-badges.herokuapp.com/maven-central/net.openhft/chronicle-map]
image:https://javadoc.io/badge2/net.openhft/chronicle-map/javadoc.svg[link="https://www.javadoc.io/doc/net.openhft/chronicle-map/latest/index.html"]
Expand Down
6 changes: 4 additions & 2 deletions benchmark/README.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
= Benchmark results
Peter Lawrey
:lang: en-GB
:source-highlighter: rouge

Summary of results on a Ryzen 9 5950X with a Corsair MP600 driver
Summary of results on a Ryzen 9 5950X with a Corsair MP600 drive

== 1 million reads and 1 million writes each second of 500 byte messages

Expand Down Expand Up @@ -98,4 +100,4 @@ worst: 8896.51 9191.42 9191.42 588251.14 8232.96
------------------------------------------------------------------------------------------
```

NOTE: Running this dataset on a 64 GB machine had lower outliers when run without graphical interface to save some memory and contention.
NOTE: Running this dataset on a 64 GB machine had lower outliers when run without graphical interface to save some memory and contention.
55 changes: 54 additions & 1 deletion checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,57 @@
<suppress files="CompiledReplicatedMapQueryContext.java" checks=".*"/>
<suppress files="CompiledMapIterationContext.java" checks=".*"/>
<suppress files="CompiledMapQueryContext.java" checks=".*"/>
</suppressions>

<!-- Test-only suppressions for legacy/examples -->
<suppress files="DirtyReadVictimTest.java"
checks="(CommentsIndentation|VariableDeclarationUsageDistance)"/>
<suppress files="ChronicleStampedLock.java"
checks="(CommentsIndentation|VariableDeclarationUsageDistance)"/>
<suppress files="DirtyReadVictim.java"
checks="(CommentsIndentation|VariableDeclarationUsageDistance)"/>
<suppress files="CHMTestIterator1.java"
checks="CommentsIndentation"/>
<suppress files="Issue229Test.java"
checks="CommentsIndentation"/>
<suppress files="ValueAlignmentRelocationTest.java"
checks="(CommentsIndentation|VariableDeclarationUsageDistance)"/>
<suppress files="MarshallableReaderWriterTest.java"
checks="CommentsIndentation"/>
<suppress files="LargeEntriesTest.java"
checks="CommentsIndentation"/>
<suppress files="DemoChronicleMapTest.java"
checks="CommentsIndentation"/>
<suppress files="Issue63Test.java"
checks="CommentsIndentation"/>
<suppress files="MapCheck.java"
checks="CommentsIndentation"/>
<suppress files="CHMUseCasesTest.java"
checks="(CommentsIndentation|VariableDeclarationUsageDistance)"/>
<suppress files="ChronicleMapTest.java"
checks="(CommentsIndentation|VariableDeclarationUsageDistance)"/>

<suppress files="DirtyReadOffender_WriterWriterTest.java"
checks="VariableDeclarationUsageDistance"/>
<suppress files="DirtyReadOffender.java"
checks="VariableDeclarationUsageDistance"/>
<suppress files="DirtyReadIntolerant.java"
checks="VariableDeclarationUsageDistance"/>
<suppress files="DirtyReadOffenderIPCTest.java"
checks="VariableDeclarationUsageDistance"/>
<suppress files="DirtyReadOffender_ReaderWriterTest.java"
checks="VariableDeclarationUsageDistance"/>
<suppress files="DirtyReadOffenderTest.java"
checks="VariableDeclarationUsageDistance"/>
<suppress files="DirtyReadOffender_WriterReaderTest.java"
checks="VariableDeclarationUsageDistance"/>
<suppress files="DirtyReadIntolerant_ReaderReader_Test.java"
checks="VariableDeclarationUsageDistance"/>
<suppress files="DirtyReadVictimIPCTest.java"
checks="CommentsIndentation"/>
<suppress files="DirtyReadVictim.java"
checks="VariableDeclarationUsageDistance"/>
<suppress files="ReaderToo.java"
checks="VariableDeclarationUsageDistance"/>
<suppress files="WriterToo.java"
checks="VariableDeclarationUsageDistance"/>
</suppressions>
2 changes: 2 additions & 0 deletions docs/CM_Compatibility_and_Versioning.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Neil Clifford
:css-signature: demo
:toc-placement: macro
:icons: font
:lang: en-GB
:source-highlighter: rouge

toc::[]

Expand Down
2 changes: 2 additions & 0 deletions docs/CM_Download.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Neil Clifford
:css-signature: demo
:toc-placement: macro
:icons: font
:lang: en-GB
:source-highlighter: rouge

toc::[]

Expand Down
6 changes: 4 additions & 2 deletions docs/CM_FAQs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Neil Clifford, Peter Lawrey, Rob Austin, Jerry Shea
:css-signature: demo
:toc-placement: preamble
:icons: font
:lang: en-GB
:source-highlighter: rouge

This document provides information for some common tasks within Chronicle Map.

Expand Down Expand Up @@ -91,12 +93,12 @@ This is because Chronicle uses the page cache and RAM is in effect a cache to th

There are two cases where having a high-speed disk will give you a real benefit:

==== 1. Data rate
==== Data rate

If the rate of data that you are writing exceeds the disk write speed.
In most applications this is unlikely to occur.

==== 2. Page cache misses
==== Page cache misses

When you get a page cache miss.
For Chronicle queues which write and read messages lineally across memory, we mitigate this situation with the use of the Chronicle pre-toucher.
Expand Down
6 changes: 4 additions & 2 deletions docs/CM_Features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ Neil Clifford
:css-signature: demo
:toc-placement: macro
:icons: font
:lang: en-GB
:source-highlighter: rouge

toc::[]

Chronicle Map is an in-memory, key-value store, designed for low-latency, and/or multi-process applications, such as trading and financial market applications.

== Features

- **Ultra low latency**: Chronicle Map targets median latency of both read and write queries of less than 1 microsecond in https://github.com/OpenHFT/Chronicle-Map/search?l=java&q=perf&type=Code[certain tests].
- **Ultra low latency**: Chronicle Map targets median latency of both read and write queries of less than 1 µs in https://github.com/OpenHFT/Chronicle-Map/search?l=java&q=perf&type=Code[certain tests].

- **High concurrency**: Write queries scale well up to the number of hardware execution threads in the server.
Read queries never block each other.
Expand All @@ -23,7 +25,7 @@ Read queries never block each other.

- Multiple processes can access a Chronicle Map concurrently.
At the same time, the data store is *in-process* for each of the accessing processes.
Out-of-process approach to IPC is simply incompatible with Chronicle Map's median latency target of < 1 μs.
Out-of-process approach to IPC is simply incompatible with Chronicle Map's median latency target of < 1 µs.

- Replication

Expand Down
3 changes: 3 additions & 0 deletions docs/CM_Replication.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Neil Clifford
:toc-placement: macro
:icons: font

:lang: en-GB
:source-highlighter: rouge

toc::[]

== Enterprise Edition
Expand Down
3 changes: 3 additions & 0 deletions docs/CM_Tutorial.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Neil Clifford
:toc-placement: macro
:icons: font

:lang: en-GB
:source-highlighter: rouge

toc::[]

This document describes the Chronicle Map tutorial supplied with the project.
Expand Down
4 changes: 3 additions & 1 deletion docs/CM_Tutorial_Behaviour.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Neil Clifford
:toc-placement: macro
:icons: font

:lang: en-GB
:source-highlighter: rouge

toc::[]

== Customization
Expand Down Expand Up @@ -333,4 +336,3 @@ System.out.println(map2.get("1"));
'''

<<CM_Tutorial.adoc#,Back to Tutorial>>

3 changes: 3 additions & 0 deletions docs/CM_Tutorial_Bytes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Neil Clifford
:toc-placement: macro
:icons: font

:lang: en-GB
:source-highlighter: rouge

toc::[]

This pair of interfaces is configured using `ChronicleMapBuilder.keyMarshallers()` or
Expand Down
5 changes: 4 additions & 1 deletion docs/CM_Tutorial_DataAccess.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Neil Clifford
:toc-placement: macro
:icons: font

:lang: en-GB
:source-highlighter: rouge

toc::[]

This pair of interfaces is configured using `ChronicleMapBuilder.keyReaderAndDataAccess()` or
Expand Down Expand Up @@ -166,4 +169,4 @@ NOTE: If you configure `byte[]` key, or value type, then this pair of serializer

'''

<<CM_Tutorial.adoc#,Back to Tutorial>>
<<CM_Tutorial.adoc#,Back to Tutorial>>
3 changes: 3 additions & 0 deletions docs/CM_Tutorial_Sized.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Neil Clifford
:toc-placement: macro
:icons: font

:lang: en-GB
:source-highlighter: rouge

toc::[]

This pair of interfaces is configured using `ChronicleMapBuilder.keyMarshallers()` or
Expand Down
3 changes: 3 additions & 0 deletions docs/CM_Tutorial_Understanding.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Neil Clifford
:toc-placement: macro
:icons: font

:lang: en-GB
:source-highlighter: rouge

toc::[]

== Problems
Expand Down
3 changes: 3 additions & 0 deletions docs/CM_Updates.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Neil Clifford
:toc-placement: macro
:icons: font

:lang: en-GB
:source-highlighter: rouge

toc::[]

Changes between Chronicle Map 3 and the previous Chronicle Map version are detailed below:
Expand Down
47 changes: 47 additions & 0 deletions docs/systemProperties.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
= Chronicle Map System Properties
:toc:
:lang: en-GB
:source-highlighter: rouge

== System Properties

This document lists system properties that influence Chronicle Map behaviour in production and test runs.
Set each property on the Java command line using `-Dkey=value`.

NOTE: Unless otherwise stated, boolean properties are parsed via Chronicle Core's `Jvm.getBoolean` helper.
They are treated as enabled if the key is present with no value, `true` or `yes`.

.System properties
[cols="2a,1,3a,2a",options="header"]
|===
| Property Key
| Default Value
| Description
| Java Variable Name (Type)

| `chronicle.map.creation.debug`
| `false`
| Enables verbose logging during Chronicle Map creation and recovery, including map name, file paths and configuration details. Useful when diagnosing startup issues and misconfigured builders.
| `MAP_CREATION_DEBUG` (`boolean`)

| `chronicle.map.file.lock.timeout.secs`
| `10`
| Number of seconds Chronicle Map waits when acquiring an internal file lock before giving up and throwing a lock related exception.
| `FILE_LOCK_TIMEOUT` (`int`)

| `chronicle.map.sparseFile`
| `false`
| When `true`, Chronicle Map uses sparse files for persisted data. This can reduce disk usage on some file systems at the cost of more fragmented allocation patterns.
| `sparseFile` (`boolean`)

| `chronicle.map.disable.locking`
| `false`
| Disables Chronicle Map file locking. When `true`, shared and exclusive locks are not acquired, which may be required on platforms without reliable file locking but removes protection against concurrent writers.
| `USE_EXCLUSIVE_LOCKING`, `USE_SHARED_LOCKING` (derived `boolean` flags)

| `net.openhft.chronicle.map.lockTimeoutSeconds`
| `60`
| Overrides the global timeout, in seconds, used when waiting for segment level locks in multi-process use. If this timeout is exceeded an `InterProcessDeadLockException` is thrown with guidance on possible causes.
| `LOCK_TIMEOUT_SECONDS` (`int`)
|===

3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<dependency>
<groupId>net.openhft</groupId>
<artifactId>third-party-bom</artifactId>
<version>3.27ea5</version>
<version>3.27ea7</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -330,7 +330,6 @@
<exclude>**/Compiled*.java</exclude>
</sourceFileExcludes>
<failOnError>false</failOnError>
<additionalOptions>-Xdoclint:none</additionalOptions>
</configuration>
</plugin>

Expand Down
7 changes: 0 additions & 7 deletions spec/3_2-lock-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ procedure and call one depending on the context.
> The reference Java implementation uses only the version of this procedure without the first two
> steps.

<a name="release-write-lock" />
<a name="write-to-update-lock-downgrade" />
<a name="write-to-read-lock-downgrade" />

## Release write lock, or write to update lock downgrade, or write to read lock downgrade

Perform a CAS operation on the count word of the lock state, comparing 0x80000000 (i. e. a count
Expand Down Expand Up @@ -141,9 +137,6 @@ procedure.
read with a wait word with the wait count decremented. If the CAS operation fails, begin the
deregister wait procedure from the start. If the CAS operation succeeds, the procedure succeeds.

<a name="time-limited-write-lock-acquisition" />
<a name="time-limited-update-to-write-lock-upgrade" />

## Time-limited write lock acquisition or update to write upgrade

1. Perform the corresponding *try acquire* procedure ([write lock](#try-acquire-write-lock) or
Expand Down
8 changes: 4 additions & 4 deletions spec/4-hashing-algorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ the primary key hash code. Then the [`hashSplitting`](3_1-header-fields.md#hashs
is applied, to determine the segment in which the key should be stored, and the part of the key hash
code to be stored in a segment tier's hash lookup.

> The reference Java implementation: [`XxHash_r39`](
> https://github.com/OpenHFT/Chronicle-Algorithms/blob/chronicle-algorithms-1.1.6/src/main/java/net/openhft/chronicle/algo/hashing/XxHash_r39.java).
> Although the Java implementation class has `_r39` suffix, the xxHash algorithm is stable since r3
> The reference Java implementation: [`XxHashR39`](
> https://github.com/OpenHFT/Chronicle-Algorithms/blob/chronicle-algorithms-1.1.6/src/main/java/net/openhft/chronicle/algo/hashing/XxHashR39.java).
> Although the algorithm originated from the r39 release, the xxHash algorithm is stable since r3
> and [won't change in the future](
> https://github.com/Cyan4973/xxHash/issues/34#issuecomment-169176338). A different version of
> the algorithm could have a different name.
Expand Down Expand Up @@ -62,4 +62,4 @@ checksum](#primary-checksum). The entry checksum is stored in the 6th field of t
structure](3-memory-layout.md#stored-entry-structure).

> The reference Java implementation: [`HashEntryChecksumStrategy`](
> ../src/main/java/net/openhft/chronicle/hash/impl/stage/entry/HashEntryChecksumStrategy.java).
> ../src/main/java/net/openhft/chronicle/hash/impl/stage/entry/HashEntryChecksumStrategy.java).
Loading