Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set segment count per node to consistent value across defaults and docs #1477

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/configuration/reaper_specific/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ <h3 id="scheduledaysbetween"><code>scheduleDaysBetween</code></h3>
<!-- raw HTML omitted -->
<h3 id="segmentcountpernode"><code>segmentCountPerNode</code></h3>
<p>Type: <em>Integer</em></p>
<p>Default: <em>16</em></p>
<p>Default: <em>64</em></p>
<p>Defines the default amount of repair segments to create for newly registered Cassandra repair runs, for each node in the cluster. When running a repair run by Reaper, each segment is repaired separately by the Reaper process, until all the segments in a token ring are repaired. The count might be slightly off the defined value, as clusters residing in multiple data centers require additional small token ranges in addition to the expected. This value can be overwritten when executing a repair run via Reaper.</p>
<p>In a 10 nodes cluster, setting a value of 20 segments per node will generate a repair run that splits the work into 200 token subranges. This number can vary due to vnodes (before 1.2.0, Reaper cannot create a segment with multiple token ranges, so the number of segments will be at least the total number of vnodes in the cluster). As Reaper tries to size segments evenly, the presence of very small token ranges can lead to have more segments than expected.</p>
<!-- raw HTML omitted -->
Expand Down
2 changes: 1 addition & 1 deletion src/docs/content/docs/configuration/reaper_specific.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ Defines the amount of days to wait between scheduling new repairs. The value con

Type: *Integer*

Default: *16*
Default: *64*

Defines the default amount of repair segments to create for newly registered Cassandra repair runs, for each node in the cluster. When running a repair run by Reaper, each segment is repaired separately by the Reaper process, until all the segments in a token ring are repaired. The count might be slightly off the defined value, as clusters residing in multiple data centers require additional small token ranges in addition to the expected. This value can be overwritten when executing a repair run via Reaper.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public final class RepairRunService {

public static final Splitter COMMA_SEPARATED_LIST_SPLITTER
= Splitter.on(',').trimResults(CharMatcher.anyOf(" ()[]\"'")).omitEmptyStrings();
public static final int DEFAULT_SEGMENT_COUNT_PER_NODE = 16;
public static final int DEFAULT_SEGMENT_COUNT_PER_NODE = 64;

private static final Logger LOG = LoggerFactory.getLogger(RepairRunService.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public void computeGlobalSegmentCountSingleTokenPerNodeTest() {
endpointToRange.put("node2", Lists.newArrayList());
endpointToRange.put("node3", Lists.newArrayList());

assertEquals(48, RepairRunService.computeGlobalSegmentCount(0, endpointToRange));
assertEquals(192, RepairRunService.computeGlobalSegmentCount(0, endpointToRange));
}

@Test
Expand All @@ -206,7 +206,7 @@ public void computeGlobalSegmentCount256TokenPerNodeTest() {
endpointToRange.put("node2", Lists.newArrayList());
endpointToRange.put("node3", Lists.newArrayList());

assertEquals(48, RepairRunService.computeGlobalSegmentCount(0, endpointToRange));
assertEquals(192, RepairRunService.computeGlobalSegmentCount(0, endpointToRange));
}

@Test
Expand Down
Loading