JetBrains Xodus v2.0.1 Release Notes

Release Date: 2022-03-29 // over 4 years ago
  • 🚀 This release brings new features (Bitmaps), API updates, the new database format, bug fixes and performance improvements.

    Bitmaps

    Two new interfaces has been added to the Environments API: Bitmap and ContextualBitmap. Bitmaps have unique names (like stores do), they let you transactionally set, get, clear and iterate over bits identified by index. Bitmaps are implemented atop of stores, so technically they aren't large arrays, rather they are similar to roaring bitmaps. They don't tend to have good data locality, but compaction is good — in particular for sparse bitmap, i.e. consisting mostly of ones or zeros.

    ⚡️ API updates

    • To trigger an action in the background cleaner thread just before database GC, Environment.executeBeforeGc(Runnable action) added.
    • StoreTransaction.findContaining(..) returns an EntityIterable of entities of specified entity type with string property having a value containing specified substring. Implementation of the EntityIterable is much faster than brute force enumeration of entities followed by filtering by property value. Thanks to Hannes Halenka for the feature request.
    • ➕ Added ability to set, add, and remove entity links based on an Entity ID.
    • SignedFloatBinding and SignedDoubleBinding added.
    • For boolean property values, there is no longer a distinction of the value 'false' and no value. This means that setting false as a property value is equal to calling deleteProperty(..). In previous versions, boolean properties could have three values: true, false, and null. This is the only potentially breaking change.

    The new database format

    As of 2.0.1, Patricia trees (backend trees for all stores created with key prefixing, i.e. with either StoreConfig.WITHOUT_DUPLICATES_WITH_PREFIXING or StoreConfig.WITH_DUPLICATES_WITH_PREFIXING) can be stored using the new format. Trees stored in the v2 format tend to be more compact with faster operations. For further insights, read a note on Xodus Version 2 Database Format and Patricia Tree Improvements.

    ⬇️ By default, the v2 database format is turned off. To turn it on, use the EnvironmentConfig.setUseVersion1Format(boolean) method. Once an application configured to use the v2 format is run over a database, it can't be downgraded to a version using the v1 format without restoring the database from backup.

    🔨 If the v2 format is turned on for databases accessed using the Entity Store API, lots of database refactorings and optimizations are automatically activated. Those include use of bitmaps for built-in indices, more compact in-place blobs and their periodic de-duplication.

    🐛 Bug fixes

    • Environments

    • Entity Stores

    🚀 Release Notes
    Maven Central


Previous changes from v1.3.232

  • 🚀 This release brings bug fixes and performance improvements related to database ciphering and memory usage control.

    ChaCha20 implementation by JetBrains

    The new implementation of ChaCha20, modern stream ciphering algorithm widely used nowadays, is written in Kotlin. Prior to this release, ChaCha20 had the only implementation provided by the Legion of the Bouncy Castle. The new implementation is identical to the Bouncy Castle's one in terms of ciphering, but consumes 13% less CPU:

    Benchmark Mode Cnt Score Error Units
    JMHStreamCipherBenchmarks.chaChaCrypt thrpt 12 97.439 ± 1.069 ops/us
    JMHStreamCipherBenchmarks.jbChaChaCrypt thrpt 12 110.342 ± 0.543 ops/us
    

    🚚 The new implementation has been used already for two months in YouTrack InCloud servers, as well as in the main production instance of JetBrains YouTrack. So it's quite safe to just replace the the Bouncy Castle's implementation (cipherId:jetbrains.exodus.crypto.streamciphers.ChaChaStreamCipherProvider) by the new one (cipherId:jetbrains.exodus.crypto.streamciphers.JBChaChaStreamCipherProvider) and have less CPU consumption as a benefit. The Bouncy Castle's implementation won't be removed in future versions.

    🌲 Log Cache can use Soft References

    👀 As of 1.3.232, it is possible to configure shared log cache to use Soft References (see EnvironmentConfig#setLogCacheUseSoftReferences). If this setting is turned on, Java GC would be able to reclaim some heap memory occupied by log cache. As before, log cache can't use more memory than certain memory control settings allow. Such memory-flexible log cache can be extremely useful during load peaks, if and when memory consumption and/or memory traffic increases explosively. The setting should be turned on explicitly, any defaults remain unchanged. Thanks to Martin Häusler for the proposal.

    🐛 Bug fixes

    Environments

    • XD-793 — GarbageCollector can miss BTree leaf in certain case of data corruption

    - XD-802 — Forced close of Environment can result in deadlock under load

    Entity Stores

    • XD-801 — NumberOfCachingJobs in EntityStoreStatistics is always 0

    🚀 Release Notes
    Maven Central