Skip to content

Conversation

@k-rus
Copy link
Member

@k-rus k-rus commented Nov 19, 2025

While working on CNDB-15608, IntelliJ lint complains were noticed, which are not related to the actual changes in the patch port. Thus I fix them in this separate commit to avoid unnecessary noise while working on the actual patch port.

Many of the changes are align what I have already merged earlier in other PRs.
Some of the changes might not match preferences from others and I am open for discussion.

The changes include:

  • Remove unused imports
  • Use the formatter of the logger instead of string concatenation
  • Use method instead of lambda
  • Remove unnecessary suppression of resource warnings
  • Simplify Boolean conditions
  • Remove unnecessary modifiers in interfaces
  • Fix typos
  • Fixing links in javadoc comments
  • Add static modifier to nested classes
  • Remove class fields when not used
  • Remove unnecessary throws in method signatures
  • Use final when recommended
  • Remove unused method arguments
  • Replace single char strings with chars
  • Remove unnecessary null variable initialization
  • Replace assert true with assert equal
  • Change order of assert arguments to have expected value first
  • Remove unnecessary explicit casting

@github-actions
Copy link

github-actions bot commented Nov 19, 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

@k-rus k-rus force-pushed the rf-15609-lint-clean-and branch 2 times, most recently from 4d30c51 to baf1b76 Compare November 20, 2025 11:21
@k-rus
Copy link
Member Author

k-rus commented Nov 20, 2025

@k-rus
Copy link
Member Author

k-rus commented Nov 20, 2025

Issues
1 New issue

The reported issue is not related to this PR change.

2 regressions found See build details here

Found 2 new test failures

Test Explanation Runs Upstream
o.a.c.index.sai.cql.VectorCompaction100dTest.testZeroOrOneToManyCompaction[dc true] NEW 🔴🔴 0 / 17
o.a.c.index.sai.cql.VectorSiftSmallTest.testMultiSegmentBuild[dc false] NEW 🔴🔴 0 / 17

Failures are not related to this PR change and also happens in another PR, e.g., #2132.

@k-rus k-rus requested review from a team and removed request for a team November 20, 2025 13:35
@k-rus k-rus marked this pull request as draft November 20, 2025 13:42
@k-rus
Copy link
Member Author

k-rus commented Nov 20, 2025

Changed to draft while investigating CI failures in https://github.com/riptano/cndb/pull/16068

@k-rus k-rus marked this pull request as ready for review November 21, 2025 10:38
@k-rus k-rus force-pushed the rf-15609-lint-clean-and branch 2 times, most recently from ff41118 to b8819d1 Compare November 24, 2025 09:25
@k-rus
Copy link
Member Author

k-rus commented Nov 24, 2025

2 regressions found See build details here

Found 2 new test failures

Test Explanation Runs Upstream
o.a.c.index.sai.cql.VectorCompaction100dTest.testZeroOrOneToManyCompaction[dc true] REGRESSION 🔴🔴 0 / 18
o.a.c.index.sai.cql.VectorSiftSmallTest.testSiftSmall[dc false]

Unrelated and known test failures

@k-rus k-rus requested review from a team and eolivelli November 24, 2025 14:46
private void forEach(Consumer<Index.Indexer> action)
{
indexers.forEach(action::accept);
indexers.forEach(action);
Copy link
Member

Choose a reason for hiding this comment

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

looks like this might even save an unnecessary object allocation

Copy link
Member

Choose a reason for hiding this comment

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

Can we remove perSSTableComponents too?

Copy link
Member Author

Choose a reason for hiding this comment

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

It might lead to memory leaks. I will re-test it, since previously I had more than one change, so the memory leak might related to similar but different change.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can we remove perSSTableComponents too?

I tested removing it from unnecessary storing as a class field and several tests failed with memory leaks. This looks to me a tech debt and potential source for memory leak bugs in future, and fixing it would require refactoring.
@michaeljmarshall what do you think about it? Is it important to create an issue and fix in future?

k-rus and others added 5 commits November 26, 2025 18:58
While working on CNDB-15608, IntelliJ lint complains were noticed,
which are not related to the actual changes in the patch port. Thus I
fix them in this separate commit to avoid unnecessary noise while
working on the actual patch port.

The changes include:
- Remove unused imports
- Remove unnecessary boilerplate code for unnamed Comparator
construction
- Use the formatter of the logger instead of string concatenation
- Use method instead of lambda
- Remove unnecessary suppression of resource warnings
- Simplify Boolean conditions
- Remove unnecessary modifiers in interfaces
- Fix typos
- Fixing links in javadoc comments
- Add static modifier to nested classes
- Remove class fields when not used
- Remove unnecessary throws in method signatures
- Use final when recommended
- Remove unused method arguments
- Replace single char strings with chars
- Remove unnecessary null variable initialization
- Replace assert true with assert equal
- Change order of assert arguments to have expected value first
- Remove unnecessary explicit casting
@k-rus k-rus force-pushed the rf-15609-lint-clean-and branch from 997a073 to 6b6de5f Compare November 26, 2025 17:58
@sonarqubecloud
Copy link

@cassci-bot
Copy link

@k-rus
Copy link
Member Author

k-rus commented Nov 28, 2025

6 regressions found See build details here

Found 6 new test failures

Some of the issues were detected memory leaks and the change was reverted. See #2131 (comment)

Other failures are not related to the PR change.

@k-rus k-rus merged commit 48b55fb into main Nov 28, 2025
488 of 497 checks passed
@k-rus k-rus deleted the rf-15609-lint-clean-and branch November 28, 2025 13:12
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