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

Fixes #577. Allow for automatically blacklisting any TWCS or DTCS ta… #585

Conversation

denniskline
Copy link
Contributor

…bles within a keyspace

Addressing the need to the automatically blacklist TWCS/DTCS tables per issue #577.

I decided to create a new Table object to handle both the Table.name and the Table.compactionStrategy in order to pull the required information in fewer calls. Doing this lead to additional modifications to consumers of JmxProxy

Please let me know if the approach looks good to you.

@JsonProperty
@NotNull
@DefaultValue("true")
private Boolean blacklistTwcsTables;
Copy link
Member

Choose a reason for hiding this comment

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

We're moving towards (thinking about?) keeping application-state in the storage, and keeping the configuration purely about Reaper's configuration (and not about the configuration of clusters that a user registers in a running Reaper).
That change hasn't materialised yet, but am noting it here for forward-reference sake.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That’s great to hear. That will definitely make the app config cleaner. Plus, supporring multiple clusters is tricky for us since we need to update reaper config and cycle when new clusters are added (all contain their own unique jmx creds).

@@ -185,6 +190,14 @@ public void setIncrementalRepair(boolean incrementalRepair) {
this.incrementalRepair = incrementalRepair;
}

public boolean getBlacklistTwcsTables() {
return blacklistTwcsTables != null ? blacklistTwcsTables : false;
Copy link
Member

Choose a reason for hiding this comment

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

Isn't returning false here contradictory to the default being false?

Copy link
Contributor

Choose a reason for hiding this comment

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

The default is set to true, but AFAIK that annotation is ignored by Dropwizard. I suggest to remove it and indeed keep the actual default to false.

Copy link
Member

Choose a reason for hiding this comment

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

@denniskline can you fix this?

@michaelsembwever
Copy link
Member

How will this work with Cassandra-4.0 and incremental repair?
That is with Cassandra-4.0 we want to recommend incremental repair, and to run it continuously. Then running it on TWCS makes sense (and the default to blacklist it should not be true).

@denniskline
Copy link
Contributor Author

Yeah, very good question and I’m not sure either. I could check node version to make sure the correct default is applied. But that gets tricky when reaper handles multi-clusters on multi-versions. Incremental TWCS in 4.0 is ok, but what if the repair is scheduled to not be incremental? Should TWCS blacklist repair tables in pre-4.0 and continue to blacklist them in 4.x when non incremental is selected?

@denniskline
Copy link
Contributor Author

@michaelsembwever - Did you want me to work on allowing TWC repairs on 4.0 before this merged in? I'm a bit confused if you want to see more added to this PR or if you like it the way it is. I'm happy to make changes. Thanks!

@michaelsembwever
Copy link
Member

Did you want me to work on allowing TWC repairs on 4.0 before this merged in?

It's not a blocker. I was mostly making the comment FTR.

It's not so much specific to Cassandra 4.0 but to incremental repairs (yes, people are unfortunately still using incremental repairs pre Cassandra 4.0).
It's also on the caveat that TWCS is ok on incremental repairs so long as the incremental repairs are run with a frequency equal to or greater (more often) than the TWCS time_window.
If you would like to add the code to blacklist only when non-incremental, then that would be awesome.

Instead of merging master into branches could you rebase the branch off master.
Merges going in both directions leads to lots of problems in git repositories, and on the tofu scale we merge into more stable branches and rebase a softer branch.

Otherwise we can merge this after

@michaelsembwever
Copy link
Member

I took over your awesome work here @denniskline, and continued it in #602

michaelsembwever pushed a commit that referenced this pull request Jan 17, 2019
michaelsembwever pushed a commit that referenced this pull request Jan 18, 2019
michaelsembwever pushed a commit that referenced this pull request Jan 18, 2019
michaelsembwever pushed a commit that referenced this pull request Jan 18, 2019
michaelsembwever pushed a commit that referenced this pull request Jan 23, 2019
michaelsembwever pushed a commit that referenced this pull request Jan 23, 2019
michaelsembwever pushed a commit that referenced this pull request Jan 26, 2019
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.

3 participants