Skip to content

Conversation

eolivelli
Copy link

What is the issue

There is no need to create the LimitingRebufferer if rate limiting is actually disabled.

image

What does this PR fix and why was it fixed

Do not create the LimitingRebufferer when not needed.

Note: the compaction rate is supposed to be modifiable at runtime. This change allows to do so. Because the change applies only to the case we open a Rebufferer, for a FileHandle that is a short lived object.

Copy link

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

Copy link

@cassci-bot
Copy link

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


1 regressions found
See build details here


Found 1 new test failures

Test Explanation Runs Upstream
o.a.c.distributed.test.IncRepairTruncationTest.testTruncateDuringIncRepair REGRESSION 🔴 2 / 18

No known test failures found

Copy link

@blambov blambov left a comment

Choose a reason for hiding this comment

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

Great catch. I was irked by this this many times but kept finding it doesn't really slow things down....I guess unless you are doing a lot of concurrent compaction.

: rebuffererFactory.instantiateRebufferer();

if (limiter != null)
if (limiter != null && limiter.getRate() != Double.MAX_VALUE)
Copy link

Choose a reason for hiding this comment

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

Make it limiter.getRange() < Double.MAX_VALUE to also skip the limiter for infinity and NaN.

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.

4 participants