Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Dec 1, 2025

This PR contains the following updates:

Package Change Age Confidence
org.restheart:restheart (source) 8.11.0 -> 8.12.0 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

SoftInstigate/restheart (org.restheart:restheart)

v8.12.0

Compare Source

RESTHeart 8.12.0 Release Notes

Release Date: November 24, 2025

Overview

RESTHeart 8.12.0 includes important bug fixes for MongoDB 8.0.16+ compatibility, HAL response serialization, query cache functionality, and dependency updates for improved security and performance.


🐛 Bug Fixes

MongoDB 8.0.16+ Transaction Compatibility

Issue: Karate integration test sessions.feature:40 failing with MongoDB 8.0.16+ due to changed transaction error message format.

Root Cause: MongoDB 8.0.16 introduced SERVER-91503 which changed transaction error messages to include session ID information for better debugging. The new format "1 on session <uuid> - <hash> - - using txnRetryCounter 0" was not recognized by RESTHeart's transaction number extraction logic, causing NumberFormatException.

Fix: Updated TxnsUtils.removeWithTxnNumber() to detect and parse the MongoDB 8.0.16+ error format while maintaining full backward compatibility with all previous MongoDB versions (5.x, 6.x, 7.x, 8.0.0-8.0.15).

Files Changed:

  • mongodb/src/main/java/org/restheart/mongodb/db/sessions/TxnsUtils.java
  • mongodb/src/test/java/org/restheart/mongodb/db/sessions/TxnsUtilsTest.java

Related:


HAL Response Empty String Serialization (Issue #​578)

Issue: Empty string fields in MongoDB documents were inconsistently returned as null in HAL (Hypertext Application Language) format responses instead of their actual empty string value "".

Root Cause: The BsonUtils.toJson() method left trailing whitespace when serializing BSON string values. MongoDB's JSON serialization produces formatted output like {"x" : ""} with spaces around the colon. After removing the structural JSON characters, a leading space remained (" ""), causing empty strings to be misrepresented.

Fix: Added .strip() call in BsonUtils.toJson() method (line 760) to remove leading and trailing whitespace from the final string representation.

Impact:

  • Fixes inconsistent HAL response behavior for documents with empty string fields
  • Ensures data integrity between MongoDB storage and REST API responses
  • No breaking changes - only fixes incorrect null representation

Files Changed:

  • commons/src/main/java/org/restheart/utils/BsonUtils.java
  • commons/src/test/java/org/restheart/utils/BsonUtilsTest.java

Related: GitHub Issue #​578


Query Cache Not Working (Issue #​575)

Issue: The ?cache query parameter was not working correctly after MongoDB driver updates, causing performance degradation for repeated queries.

Fix: Refactored Collections.java and GetCollectionCache.java to properly handle collection caching with the updated MongoDB driver internals. Added comprehensive integration tests in MongoDriverInternalsIT.java to verify cache functionality.

Files Changed:

  • mongodb/src/main/java/org/restheart/mongodb/db/Collections.java
  • mongodb/src/main/java/org/restheart/mongodb/db/GetCollectionCache.java
  • test-integration/src/test/java/org/restheart/test/integration/MongoDriverInternalsIT.java

Related: GitHub Issue #​575


🔧 Improvements

Enhanced Whitespace Handling

Refactored PingService and MetricsService to replace trim() with strip() for improved whitespace handling, consistent with modern Java best practices and Unicode support.

Files Changed:

  • core/src/main/java/org/restheart/handlers/PingService.java
  • metrics/src/main/java/org/restheart/metrics/MetricsService.java

Code Quality Improvements
  • RequestDispatcherHandler: Refactored for improved readability and maintainability
  • MongoDriverInternalsIT: Fixed test reliability issues

📦 Dependency Updates

  • jboss-threads: Updated to 3.9.2 (security and performance improvements)
  • logback-classic: Updated to 1.5.21 (latest stable release with bug fixes)

🧪 Testing

New Test Coverage
  • Added testToJsonEmptyString() and testToJsonDocumentWithEmptyString() in BsonUtilsTest (23 total tests)
  • Added testRemoveWithTxnNumberMongo8() in TxnsUtilsTest (5 total tests)
  • Added comprehensive integration tests in MongoDriverInternalsIT for cache functionality
Test Results

✅ All 149 tests pass across all modules:

  • commons
  • security
  • mongodb
  • graphql
  • metrics
  • core
  • test-plugins
  • polyglot

🔄 Backward Compatibility

MongoDB Transaction Format Support

RESTHeart 8.12.0 maintains full backward compatibility with all MongoDB transaction error formats:

  • MongoDB <5: with txnNumber 10
  • MongoDB 5: with { txnNumber: 10 }
  • MongoDB 6/7: with txnNumberAndRetryCounter { txnNumber: 10, txnRetryCounter: 0 }
  • MongoDB 8.0.0-8.0.15: 1 using txnRetryCounter 0
  • MongoDB 8.0.16+: 1 on session <uuid> - <hash> - - using txnRetryCounter 0

📋 Upgrade Notes

This is a recommended update for all users, especially those:

  • Running MongoDB 8.0.16 or later
  • Using HAL responses with empty string fields
  • Experiencing cache-related performance issues

No configuration changes or data migration required.


🔗 Links


Full Changelog: SoftInstigate/restheart@8.11.0...8.12.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from waghanza as a code owner December 1, 2025 09:11
@waghanza waghanza merged commit d597db0 into develop Dec 1, 2025
1 check passed
@waghanza waghanza deleted the renovate/restheart.version branch December 1, 2025 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants