Skip to content

Conversation

@michaelsembwever
Copy link
Member

https://github.com/riptano/cndb/issues/16175

Port into main-5.0 commit 3d62e03

CNDB-16175: CNDB-15990: Avoid varargs allocations in atomicMoveWithFallback

https://github.com/riptano/cndb/issues/15990

- What: Eliminates unnecessary array allocations in PathUtils.atomicMoveWithFallback() by pre-allocating CopyOption[] arrays as static constants.

- Why: JFR profiling showed this method was a memory allocation hotspot during RemoteFileCache preloading. Each call to Files.move() with varargs parameters created new arrays, causing excessive GC pressure.

@github-actions
Copy link

github-actions bot commented Dec 9, 2025

Checklist before you submit for review

  • This PR adheres to the Definition of Done
  • Make sure there is a PR in the CNDB project updating the Converged Cassandra version
  • Use NoSpamLogger for log lines that may appear frequently in the logs
  • Verify test results on Butler
  • Test coverage for new/modified code is > 80%
  • Proper code formatting
  • Proper title for each commit staring with the project-issue number, like CNDB-1234
  • Each commit has a meaningful description
  • Each commit is not very long and contains related changes
  • Renames, moves and reformatting are in distinct commits
  • All new files should contain the DataStax copyright header instead of the Apache License one

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 9, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
70.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link

@djatnieks djatnieks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some extra lines from CC4 were included by the merge...

…llback (#2124)

riptano/cndb#15990

- What: Eliminates unnecessary array allocations in
PathUtils.atomicMoveWithFallback() by pre-allocating CopyOption[] arrays
as static constants.

- Why: JFR profiling showed this method was a memory allocation hotspot
during RemoteFileCache preloading. Each call to Files.move() with
varargs parameters created new arrays, causing excessive GC pressure.
@cassci-bot
Copy link

❌ Build ds-cassandra-pr-gate/PR-2163 rejected by Butler


4 regressions found
See build details here


Found 4 new test failures

Test Explanation Runs Upstream
replica_side_filtering_test.TestAllowFiltering.test_consistent_wide_table (offheap-bti) NEW 🔵🔴 0 / 26
o.a.c.cql3.validation.operations.AggregationQueriesTest.testAggregationQueryShouldNotTimeoutWhenItExceedesReadTimeout (compression) NEW 🔴🔴 2 / 26
o.a.c.index.SecondaryIndexManagerTest.testIndexRebuildWhenAddingSStableViaRemoteReload (compression) NEW 🔴🔴 20 / 26
o.a.c.net.proxy.ProxyHandlerTest.testLatencyForMany (compression) NEW 🔵🔴 0 / 26

Found 5 known test failures

@michaelsembwever michaelsembwever merged commit e054ecf into main-5.0 Dec 12, 2025
579 of 592 checks passed
@michaelsembwever michaelsembwever deleted the mck-cndb-16175-main-5.0 branch December 12, 2025 22:00
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.

5 participants