Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

Fix for concurrent modification exception on removing table#78

Open
podile wants to merge 15 commits into
instaclustr:masterfrom
podile:fix-for-concurrent-modification-exception-on-removing-table
Open

Fix for concurrent modification exception on removing table#78
podile wants to merge 15 commits into
instaclustr:masterfrom
podile:fix-for-concurrent-modification-exception-on-removing-table

Conversation

@podile

@podile podile commented Mar 15, 2020

Copy link
Copy Markdown

Fix for the issue #77

I am able reproduce the issue with below code snippet.

`package com.zegelin.cassandra.exporter;

import com.google.common.collect.Sets;
import java.util.Set;

public class TestSets {

public static void main(String args[]) {
    Set<String> set1 = Sets.newHashSet("E1", "E2", "E3", "E4", "E5", "E6");
    Set<String> set2 = Sets.newHashSet("E4", "E5", "E6");
    Set<String> removedMBeans = Sets.difference(set1, set2);
    for (String e : removedMBeans) {
        set1.remove(e);
    }
}

}
`

zegelin and others added 15 commits February 20, 2020 18:12
Enhanced code to filter quantiles based on user choice
Included --cql-ssl option to crated encrypted native connection
Added latest version of jars as the older version are having some
vulnerabilities
Used netty 4.1.42.Final to be inline with another PR
…le-filter

The master branch contains some important fixes.
Applied quantile filtering while writing metrics into socket.
Corrected formating.
Reverted netty jar version changes.
Appended the new line at the end of files which removed while restoring
previous changes from repo.
@podile

podile commented Mar 15, 2020

Copy link
Copy Markdown
Author

This PR fixes the issue #77

@eperott

eperott commented Mar 30, 2020

Copy link
Copy Markdown

Would it be possible to reproduce the issue in a unit test? That way it would be easy to verify the fix, and to make sure that the issue is not re-introduced in a future refactoring.

Also, your PR contain a range of different changes. Perhaps it will be easier for maintainers to review/merge your PR if you can extract your fix into a separate branch before you create the PR.

@podile

podile commented Apr 9, 2020

Copy link
Copy Markdown
Author

Would it be possible to reproduce the issue in a unit test? That way it would be easy to verify the fix, and to make sure that the issue is not re-introduced in a future refactoring.

Also, your PR contain a range of different changes. Perhaps it will be easier for maintainers to review/merge your PR if you can extract your fix into a separate branch before you create the PR.

Lot of mocking required to initialize and call the method reconcileMBeans of the class JMXHarvester as the constructor itself triggering lot of functionality through metadataFactory. Since the fix I made is very simple and straight forward,I would prefer not to add any test case in this particular case.

Sorry for the inconvenience made by the rage of changes in my PR, I pulled all merged changes form zegelin/cassandra-exporter as it contains important fixes. I will find a better way next time.

@johndelcastillo johndelcastillo force-pushed the master branch 2 times, most recently from 3b88272 to 84cb7cd Compare October 19, 2023 03:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants