Giter VIP home page Giter VIP logo

Comments (8)

adejanovski avatar adejanovski commented on May 24, 2024

HI,

this is deliberate actually.

Incremental repair doesn't handle concurrency very well, and it definitely does not work with subrange repair (anticompaction is disactivated in Cassandra with subrange repair).

And if you try to run it on more than one node at a time, you'll get in Validation Error hell, because an SSTable cannot be validation compacted and anticompacted at the same time.

I forced Reaper to create a single "fake" segment per node, so that we only process one node at a time.

If you want to perform subrange repair just set incremental to false (which you should do unless you're using TWCS, which might be the only compaction strategy that could work correctly with incremental repair).

from cassandra-reaper.

milannister avatar milannister commented on May 24, 2024

Yes, but nodes.keySet().size() can be passed only in case when incremental repair is true. If incremental repair is false, that means that subrange repair is run and tokenSegments.size() should be passed as argument, right?

from cassandra-reaper.

adejanovski avatar adejanovski commented on May 24, 2024

Hi @milannister ,

the number of segments will get overriden in storeNewRepairSegment() :

private static void storeNewRepairSegments(AppContext context, List<RingRange> tokenSegments,
                                             RepairRun repairRun, RepairUnit repairUnit) {
    List<RepairSegment.Builder> repairSegmentBuilders = Lists.newArrayList();
    for (RingRange range : tokenSegments) {
      RepairSegment.Builder repairSegment = new RepairSegment.Builder(repairRun.getId(), range,
                                                                      repairUnit.getId());
      repairSegmentBuilders.add(repairSegment);
    }
    context.storage.addRepairSegments(repairSegmentBuilders, repairRun.getId());
    if (repairRun.getSegmentCount() != tokenSegments.size()) {
      LOG.debug("created segment amount differs from expected default {} != {}",
                repairRun.getSegmentCount(), tokenSegments.size());
      context.storage.updateRepairRun(
          repairRun.with().segmentCount(tokenSegments.size()).build(repairRun.getId()));
    }
  }

Here you can see that we call udpateRepairRun and feed it with tokenSegments.size().

from cassandra-reaper.

milannister avatar milannister commented on May 24, 2024

Hi @adejanovski

You are right. It appears that the value is overwritten.

However, based on the schedule:
reaper-schedule

I would expect that segment count on repair result screen is not equal to the number of nodes (which is 20 in our case), but to the value on schedule screen:
reaper-segment-count

Why is this happening?

from cassandra-reaper.

adejanovski avatar adejanovski commented on May 24, 2024

Hi @milannister,

I can reproduce the bug locally and will issue a fix ASAP.

from cassandra-reaper.

adejanovski avatar adejanovski commented on May 24, 2024

@milannister,

fix has been merged into master.
The display wasn't right but the number of segments was correct.

Please confirm that the fix works for you.

Thanks

from cassandra-reaper.

adejanovski avatar adejanovski commented on May 24, 2024

Fix released in 0.5.0

from cassandra-reaper.

milannister avatar milannister commented on May 24, 2024

Sorry for late response. We are currently testing the cluster without repair. Will confirm the fix locally as soon as I setup the environment.
Thanks for being so responsive!

from cassandra-reaper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.