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

Replace uninterruptible wait #26

Merged

Conversation

Bouncheck
Copy link
Contributor

Current cassandra-stress when set up to work for specific duration will wait that duration even if all consumer threads fail.
This PR adds 2 modifications:

  • removes the uninterruptible wait and in default case replaces it with awaiting on CountDownLatch used for monitoring ongoing consumer jobs. Maximum wait time is set to configured duration.
  • Adds another error settings option, that changes the behaviour to await for set duration or until first consumer thread fails instead of waiting for all of them to end.

Fixes scylladb/scylla-tools-java/issues/168

Instead of using `Uninterruptibles.sleepUninterruptibly` for set duration
await on latch for completion of all threads or until duration elapses.
Adds an option that will stop other consumer threads in case one of them fails
@Bouncheck
Copy link
Contributor Author

I was unsure if this should be created in scylla-tools-java repo or here. LMK if I should recreate it elsewhere.

@fruch
Copy link

fruch commented Oct 21, 2024

I was unsure if this should be created in scylla-tools-java repo or here. LMK if I should recreate it elsewhere.

this is a good start, and later if we need that backported, we'll need to apply to scylla-tools-java and older releases

@CodeLieutenant CodeLieutenant added the enhancement New feature or request label Oct 21, 2024
@CodeLieutenant CodeLieutenant merged commit 6d3313a into scylladb:master Oct 21, 2024
2 checks passed
CodeLieutenant added a commit to CodeLieutenant/scylla-cluster-tests that referenced this pull request Nov 21, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
CodeLieutenant added a commit to CodeLieutenant/scylla-cluster-tests that referenced this pull request Nov 21, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
CodeLieutenant added a commit to CodeLieutenant/scylla-cluster-tests that referenced this pull request Nov 23, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
CodeLieutenant added a commit to CodeLieutenant/scylla-cluster-tests that referenced this pull request Nov 23, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
fruch pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 26, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
mergify bot pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 26, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)

# Conflicts:
#	defaults/docker_images/cassandra-stress/values_cassandra-stress.yaml
mergify bot pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 26, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)

# Conflicts:
#	defaults/docker_images/cassandra-stress/values_cassandra-stress.yaml
mergify bot pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 26, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)
mergify bot pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 26, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)

# Conflicts:
#	defaults/docker_images/cassandra-stress/values_cassandra-stress.yaml
mergify bot pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 26, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)
mergify bot pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 26, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)
mergify bot pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 26, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)
fruch pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 27, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)
fruch pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 27, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)
fruch pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 27, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)
fruch pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 27, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)
fruch pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 28, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)
fruch pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 28, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)
fruch pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 28, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)
fruch pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 28, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)
fruch pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Nov 28, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)

# Conflicts:
#	defaults/docker_images/cassandra-stress/values_cassandra-stress.yaml
fruch pushed a commit to scylladb/scylla-cluster-tests that referenced this pull request Dec 1, 2024
Main reason for version change:

Using cassandra-stress 3.17 to mittigate
- Switch to ReplicaOrdering.RANDOM for select LBPs
  [32](scylladb/cassandra-stress#32)

Other Noticable Changes since the last version used in SCT:

- Add support for hostname verification
  [31](scylladb/cassandra-stress#31)
- Print thread dump on specific signals
  [27](scylladb/cassandra-stress#27)
- Replace uninterruptible wait
  [26](scylladb/cassandra-stress#26)
- Make it use DCAwareRoundRobinPolicy unless rack is provided
  [21](scylladb/cassandra-stress#21)
- feature(docker): adding support for dependabot
  [19](scylladb/cassandra-stress#19)

Signed-off-by: Dusan Malusev <[email protected]>
(cherry picked from commit 02997a6)

# Conflicts:
#	defaults/docker_images/cassandra-stress/values_cassandra-stress.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cassandra-stress can keep running even if thread had failed
3 participants