[jira] [Updated] (CASSANDRASC-46) Migrate minikube to testcontainers for integration tests

2022-10-14 Thread Yifan Cai (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRASC-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yifan Cai updated CASSANDRASC-46:
-
Reviewers: Yifan Cai
   Status: Review In Progress  (was: Needs Committer)

+1 on the patch. Tested locally. The integration test runs and it runs fast. 

> Migrate minikube to testcontainers for integration tests
> 
>
> Key: CASSANDRASC-46
> URL: https://issues.apache.org/jira/browse/CASSANDRASC-46
> Project: Sidecar for Apache Cassandra
>  Issue Type: Improvement
>  Components: Configuration
>Reporter: Francisco Guerrero
>Assignee: Francisco Guerrero
>Priority: Normal
>  Labels: pull-request-available
>
> The existing Cassandra Sidecar integration testing suite uses Minikube to 
> provision a Cassandra service and it performs tests against the running 
> database. This database runs on Minikube.
> A new alternative is to use [testcontainers|https://www.testcontainers.org], 
> which requires Docker to run tests. The concept is similar, but the benefit 
> is that *testcontainers* is well integrated into the java ecosystem and it 
> works well with junit5. By replacing Minikube with {{testcontainers}} we can 
> simplify the setup process and reduce the complexity of the setup.
> Additionally, {{testcontainers}} is supported as part of the testing 
> infrastructure inside 
> [CircleCI|https://www.testcontainers.org/supported_docker_environment/continuous_integration/circle_ci/].
>  Currently, our Minikube tests are broken both locally and in CircleCI. 
> Moving to {{testcontainers}} would also unblock us for further development.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRASC-46) Migrate minikube to testcontainers for integration tests

2022-10-14 Thread Francisco Guerrero (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRASC-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francisco Guerrero updated CASSANDRASC-46:
--
Test and Documentation Plan: Fixed integration tests. It now uses 
testcontainers instead of Minikube.
 Status: Patch Available  (was: Open)

PR: https://github.com/apache/cassandra-sidecar/pull/40
CI: 
https://app.circleci.com/pipelines/github/frankgh/cassandra-sidecar?branch=CASSANDRASC-46

> Migrate minikube to testcontainers for integration tests
> 
>
> Key: CASSANDRASC-46
> URL: https://issues.apache.org/jira/browse/CASSANDRASC-46
> Project: Sidecar for Apache Cassandra
>  Issue Type: Improvement
>  Components: Configuration
>Reporter: Francisco Guerrero
>Assignee: Francisco Guerrero
>Priority: Normal
>  Labels: pull-request-available
>
> The existing Cassandra Sidecar integration testing suite uses Minikube to 
> provision a Cassandra service and it performs tests against the running 
> database. This database runs on Minikube.
> A new alternative is to use [testcontainers|https://www.testcontainers.org], 
> which requires Docker to run tests. The concept is similar, but the benefit 
> is that *testcontainers* is well integrated into the java ecosystem and it 
> works well with junit5. By replacing Minikube with {{testcontainers}} we can 
> simplify the setup process and reduce the complexity of the setup.
> Additionally, {{testcontainers}} is supported as part of the testing 
> infrastructure inside 
> [CircleCI|https://www.testcontainers.org/supported_docker_environment/continuous_integration/circle_ci/].
>  Currently, our Minikube tests are broken both locally and in CircleCI. 
> Moving to {{testcontainers}} would also unblock us for further development.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRASC-46) Migrate minikube to testcontainers for integration tests

2022-10-14 Thread Francisco Guerrero (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRASC-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francisco Guerrero updated CASSANDRASC-46:
--
Status: Needs Committer  (was: Patch Available)

> Migrate minikube to testcontainers for integration tests
> 
>
> Key: CASSANDRASC-46
> URL: https://issues.apache.org/jira/browse/CASSANDRASC-46
> Project: Sidecar for Apache Cassandra
>  Issue Type: Improvement
>  Components: Configuration
>Reporter: Francisco Guerrero
>Assignee: Francisco Guerrero
>Priority: Normal
>  Labels: pull-request-available
>
> The existing Cassandra Sidecar integration testing suite uses Minikube to 
> provision a Cassandra service and it performs tests against the running 
> database. This database runs on Minikube.
> A new alternative is to use [testcontainers|https://www.testcontainers.org], 
> which requires Docker to run tests. The concept is similar, but the benefit 
> is that *testcontainers* is well integrated into the java ecosystem and it 
> works well with junit5. By replacing Minikube with {{testcontainers}} we can 
> simplify the setup process and reduce the complexity of the setup.
> Additionally, {{testcontainers}} is supported as part of the testing 
> infrastructure inside 
> [CircleCI|https://www.testcontainers.org/supported_docker_environment/continuous_integration/circle_ci/].
>  Currently, our Minikube tests are broken both locally and in CircleCI. 
> Moving to {{testcontainers}} would also unblock us for further development.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17939) CircleCI: Automatically detect and repeat new or modified JUnit tests

2022-10-14 Thread Jira


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617972#comment-17617972
 ] 

Andres de la Peña commented on CASSANDRA-17939:
---

I have just updated the script with missed variables, I totally missed that.

I have also added a couple of [missing flags in the dtests 
multiplexer|https://github.com/apache/cassandra/pull/1899/commits/9f1bc35de5447e2e14d981f6d4d9ee7da875824e].
 Their purpose is making sure that we only tests upgrades towards the current 
branch. These flags are used by the regular {{upgrade_dtests}} jobs that 
{{upgrade_dtests_repeat}} mimics, so the repeated task should also use them.

Thanks for all the feedback, it's really useful :)

> CircleCI: Automatically detect and repeat new or modified JUnit tests
> -
>
> Key: CASSANDRA-17939
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17939
> Project: Cassandra
>  Issue Type: Task
>  Components: CI
>Reporter: Andres de la Peña
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>
> The purpose of this ticket is adding a new CircleCI job that automatically 
> detects new or modified test classes and runs them repeatedly. That way we 
> wouldn't need to manually specify those tests with {{.circleci/generate.sh}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-17891) Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window

2022-10-14 Thread Stefan Miklosovic (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-17891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Miklosovic updated CASSANDRA-17891:
--
  Fix Version/s: 4.1-rc
 4.2
 (was: 4.x)
 (was: 4.1.x)
  Since Version: 4.1-alpha1
Source Control Link: 
https://github.com/apache/cassandra-dtest/commit/9d9f4648f9232b1c14d017436f1038e320d064a2
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

> Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window
> ---
>
> Key: CASSANDRA-17891
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17891
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Ekaterina Dimitrova
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.1-rc, 4.2
>
>
> hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window is flaky
>  
> {code:java}
> self = 
> @since('4.1')
> def test_hintedhandoff_window(self):
> """
> Test that we only store at a maximum the hint window worth of 
> hints.
> Prior to CASSANDRA-14309 we would store another window worth of 
> hints
> if the down node was brought up and then taken back down 
> immediately.
> We would also store another window of hints on a live node if the 
> live
> node was restarted.
> @jira_ticket CASSANDRA-14309
> """
> 
> # hint_window_persistent_enabled is set to true by default
> self.cluster.set_configuration_options({'max_hint_window_in_ms': 
> 1,
> 'hinted_handoff_enabled': 
> True,
> 'max_hints_delivery_threads': 
> 1,
> 'hints_flush_period_in_ms': 
> 100, })
> self.cluster.populate(2).start()
> node1, node2 = self.cluster.nodelist()
> session = self.patient_cql_connection(node1)
> create_ks(session, 'ks', 2)
> create_c1c2_table(self, session)
> 
> # Stop handoff until very end and take node2 down for first round of 
> hints
> node1.nodetool('pausehandoff')
> 
> node2.nodetool('disablebinary')
> node2.watch_log_for(["Stop listening for CQL clients"], timeout=120)
> 
> node2.nodetool('disablegossip')
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120)
> node1.watch_log_for(["state jump to shutdown"], timeout=120)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> # First round of hints. We expect these to be replayed and the only
> # hints within the window
> insert_c1c2(session, n=(0, 100), consistency=ConsistencyLevel.ONE)
> 
> # Let hint window pass
> time.sleep(15)
> 
> # Re-enable and disable the node. Prior to CASSANDRA-14215 this 
> should make the hint window on node1 reset.
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> node2.nodetool('disablegossip')
> 
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120, from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to shutdown"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> def endpoint_downtime(node_to_query, node):
> mbean = make_mbean('net', type='Gossiper')
> with JolokiaAgent(node_to_query) as jmx:
> return jmx.execute_method(mbean, 
> 'getEndpointDowntime(java.lang.String)', [node])
> 
> while endpoint_downtime(node1, "127.0.0.2") <= 5000:
> time.sleep(1)
> 
> # Second round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(100, 200), consistency=ConsistencyLevel.ONE)
> 
> # Restart node1. Prior to CASSANDRA-14215 this would reset node1's 
> hint window.
> node1.stop()
> node1.start(wait_for_binary_proto=True, wait_other_notice=False)
> session = self.patient_exclusive_cql_connection(node1)
> session.execute('USE ks')
> # Third round of inserts. We do not expect hints to be stored.
> 

[jira] [Updated] (CASSANDRA-17891) Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window

2022-10-14 Thread Stefan Miklosovic (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-17891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Miklosovic updated CASSANDRA-17891:
--
Status: Ready to Commit  (was: Review In Progress)

> Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window
> ---
>
> Key: CASSANDRA-17891
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17891
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Ekaterina Dimitrova
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.1.x, 4.x
>
>
> hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window is flaky
>  
> {code:java}
> self = 
> @since('4.1')
> def test_hintedhandoff_window(self):
> """
> Test that we only store at a maximum the hint window worth of 
> hints.
> Prior to CASSANDRA-14309 we would store another window worth of 
> hints
> if the down node was brought up and then taken back down 
> immediately.
> We would also store another window of hints on a live node if the 
> live
> node was restarted.
> @jira_ticket CASSANDRA-14309
> """
> 
> # hint_window_persistent_enabled is set to true by default
> self.cluster.set_configuration_options({'max_hint_window_in_ms': 
> 1,
> 'hinted_handoff_enabled': 
> True,
> 'max_hints_delivery_threads': 
> 1,
> 'hints_flush_period_in_ms': 
> 100, })
> self.cluster.populate(2).start()
> node1, node2 = self.cluster.nodelist()
> session = self.patient_cql_connection(node1)
> create_ks(session, 'ks', 2)
> create_c1c2_table(self, session)
> 
> # Stop handoff until very end and take node2 down for first round of 
> hints
> node1.nodetool('pausehandoff')
> 
> node2.nodetool('disablebinary')
> node2.watch_log_for(["Stop listening for CQL clients"], timeout=120)
> 
> node2.nodetool('disablegossip')
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120)
> node1.watch_log_for(["state jump to shutdown"], timeout=120)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> # First round of hints. We expect these to be replayed and the only
> # hints within the window
> insert_c1c2(session, n=(0, 100), consistency=ConsistencyLevel.ONE)
> 
> # Let hint window pass
> time.sleep(15)
> 
> # Re-enable and disable the node. Prior to CASSANDRA-14215 this 
> should make the hint window on node1 reset.
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> node2.nodetool('disablegossip')
> 
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120, from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to shutdown"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> def endpoint_downtime(node_to_query, node):
> mbean = make_mbean('net', type='Gossiper')
> with JolokiaAgent(node_to_query) as jmx:
> return jmx.execute_method(mbean, 
> 'getEndpointDowntime(java.lang.String)', [node])
> 
> while endpoint_downtime(node1, "127.0.0.2") <= 5000:
> time.sleep(1)
> 
> # Second round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(100, 200), consistency=ConsistencyLevel.ONE)
> 
> # Restart node1. Prior to CASSANDRA-14215 this would reset node1's 
> hint window.
> node1.stop()
> node1.start(wait_for_binary_proto=True, wait_other_notice=False)
> session = self.patient_exclusive_cql_connection(node1)
> session.execute('USE ks')
> # Third round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(200, 300), consistency=ConsistencyLevel.ONE)
> 
> # Enable node2 and wait for hints to be replayed
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_2)
> 
> node2.nodetool('enablebinary')
> 

[cassandra-dtest] branch trunk updated: fix pycodestyle issues for hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window

2022-10-14 Thread smiklosovic
This is an automated email from the ASF dual-hosted git repository.

smiklosovic pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 6bf2a1f9 fix pycodestyle issues for 
hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window
6bf2a1f9 is described below

commit 6bf2a1f98833fd5d561975d7ed422dea899d7102
Author: Stefan Miklosovic 
AuthorDate: Fri Oct 14 22:39:44 2022 +0200

fix pycodestyle issues for 
hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window

patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-17891
---
 hintedhandoff_test.py | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hintedhandoff_test.py b/hintedhandoff_test.py
index 72319e21..c2a1a51a 100644
--- a/hintedhandoff_test.py
+++ b/hintedhandoff_test.py
@@ -215,7 +215,7 @@ class TestHintedHandoff(Tester):
 @jira_ticket CASSANDRA-14309
 """
 
-def wait_for_downtime(node_to_query,node,downtime):
+def wait_for_downtime(node_to_query, node, downtime):
 def endpoint_downtime(node_to_query, node):
 mbean = make_mbean('net', type='Gossiper')
 with JolokiaAgent(node_to_query) as jmx:
@@ -231,10 +231,9 @@ class TestHintedHandoff(Tester):
 while endpoint_downtime(node_to_query, node) <= 
downtime:
 time.sleep(1)
 run = False
-except:
+except Exception:
 pass
 
-
 # hint_window_persistent_enabled is set to true by default
 self.cluster.set_configuration_options({'max_hint_window_in_ms': 1,
 'hinted_handoff_enabled': True,
@@ -333,5 +332,5 @@ class TestHintedHandoff(Tester):
 exception = ex
 pass
 
-if exception != None:
+if exception is not None:
 raise exception


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra-dtest] branch trunk updated (fde75a88 -> 9d9f4648)

2022-10-14 Thread smiklosovic
This is an automated email from the ASF dual-hosted git repository.

smiklosovic pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git


from fde75a88 align audit log tests with CASSANDRA-17933
 add 9d9f4648 fix flaky 
hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window

No new revisions were added by this update.

Summary of changes:
 hintedhandoff_test.py | 54 +--
 1 file changed, 44 insertions(+), 10 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17891) Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window

2022-10-14 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617946#comment-17617946
 ] 

Brandon Williams commented on CASSANDRA-17891:
--

+1

> Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window
> ---
>
> Key: CASSANDRA-17891
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17891
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Ekaterina Dimitrova
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.1.x, 4.x
>
>
> hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window is flaky
>  
> {code:java}
> self = 
> @since('4.1')
> def test_hintedhandoff_window(self):
> """
> Test that we only store at a maximum the hint window worth of 
> hints.
> Prior to CASSANDRA-14309 we would store another window worth of 
> hints
> if the down node was brought up and then taken back down 
> immediately.
> We would also store another window of hints on a live node if the 
> live
> node was restarted.
> @jira_ticket CASSANDRA-14309
> """
> 
> # hint_window_persistent_enabled is set to true by default
> self.cluster.set_configuration_options({'max_hint_window_in_ms': 
> 1,
> 'hinted_handoff_enabled': 
> True,
> 'max_hints_delivery_threads': 
> 1,
> 'hints_flush_period_in_ms': 
> 100, })
> self.cluster.populate(2).start()
> node1, node2 = self.cluster.nodelist()
> session = self.patient_cql_connection(node1)
> create_ks(session, 'ks', 2)
> create_c1c2_table(self, session)
> 
> # Stop handoff until very end and take node2 down for first round of 
> hints
> node1.nodetool('pausehandoff')
> 
> node2.nodetool('disablebinary')
> node2.watch_log_for(["Stop listening for CQL clients"], timeout=120)
> 
> node2.nodetool('disablegossip')
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120)
> node1.watch_log_for(["state jump to shutdown"], timeout=120)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> # First round of hints. We expect these to be replayed and the only
> # hints within the window
> insert_c1c2(session, n=(0, 100), consistency=ConsistencyLevel.ONE)
> 
> # Let hint window pass
> time.sleep(15)
> 
> # Re-enable and disable the node. Prior to CASSANDRA-14215 this 
> should make the hint window on node1 reset.
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> node2.nodetool('disablegossip')
> 
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120, from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to shutdown"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> def endpoint_downtime(node_to_query, node):
> mbean = make_mbean('net', type='Gossiper')
> with JolokiaAgent(node_to_query) as jmx:
> return jmx.execute_method(mbean, 
> 'getEndpointDowntime(java.lang.String)', [node])
> 
> while endpoint_downtime(node1, "127.0.0.2") <= 5000:
> time.sleep(1)
> 
> # Second round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(100, 200), consistency=ConsistencyLevel.ONE)
> 
> # Restart node1. Prior to CASSANDRA-14215 this would reset node1's 
> hint window.
> node1.stop()
> node1.start(wait_for_binary_proto=True, wait_other_notice=False)
> session = self.patient_exclusive_cql_connection(node1)
> session.execute('USE ks')
> # Third round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(200, 300), consistency=ConsistencyLevel.ONE)
> 
> # Enable node2 and wait for hints to be replayed
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_2)
> 
> node2.nodetool('enablebinary')
> 

[jira] [Commented] (CASSANDRA-17948) Get warning and errors through virtual tables

2022-10-14 Thread Stefan Miklosovic (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617930#comment-17617930
 ] 

Stefan Miklosovic commented on CASSANDRA-17948:
---

Running here 
https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/2000/

> Get warning and errors through virtual tables
> -
>
> Key: CASSANDRA-17948
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17948
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Feature/Virtual Tables
>Reporter: Michiel Saelen
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.x
>
> Attachments: signature.asc
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The warnings and errors are currently only accessible through Cassandra logs. 
> Automating the monitoring of the nodes would be much easier/secure if we can 
> make use of virtual tables to get the logs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17891) Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window

2022-10-14 Thread Stefan Miklosovic (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617929#comment-17617929
 ] 

Stefan Miklosovic commented on CASSANDRA-17891:
---

I tweaked the code a little (PR is same).

I did 3x 500 and all passed

[https://app.circleci.com/pipelines/github/instaclustr/cassandra/1426/workflows/c301d1bb-0f41-41d9-9859-ea8db283c593/jobs/6214]

[https://app.circleci.com/pipelines/github/instaclustr/cassandra/1427/workflows/62b1abc6-da9d-4d4f-90fb-8983d3a6bb17/jobs/6216]

[https://app.circleci.com/pipelines/github/instaclustr/cassandra/1428/workflows/c32c074c-64cf-4bf0-a882-9c88bbe14970/jobs/6218]

> Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window
> ---
>
> Key: CASSANDRA-17891
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17891
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Ekaterina Dimitrova
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.1.x, 4.x
>
>
> hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window is flaky
>  
> {code:java}
> self = 
> @since('4.1')
> def test_hintedhandoff_window(self):
> """
> Test that we only store at a maximum the hint window worth of 
> hints.
> Prior to CASSANDRA-14309 we would store another window worth of 
> hints
> if the down node was brought up and then taken back down 
> immediately.
> We would also store another window of hints on a live node if the 
> live
> node was restarted.
> @jira_ticket CASSANDRA-14309
> """
> 
> # hint_window_persistent_enabled is set to true by default
> self.cluster.set_configuration_options({'max_hint_window_in_ms': 
> 1,
> 'hinted_handoff_enabled': 
> True,
> 'max_hints_delivery_threads': 
> 1,
> 'hints_flush_period_in_ms': 
> 100, })
> self.cluster.populate(2).start()
> node1, node2 = self.cluster.nodelist()
> session = self.patient_cql_connection(node1)
> create_ks(session, 'ks', 2)
> create_c1c2_table(self, session)
> 
> # Stop handoff until very end and take node2 down for first round of 
> hints
> node1.nodetool('pausehandoff')
> 
> node2.nodetool('disablebinary')
> node2.watch_log_for(["Stop listening for CQL clients"], timeout=120)
> 
> node2.nodetool('disablegossip')
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120)
> node1.watch_log_for(["state jump to shutdown"], timeout=120)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> # First round of hints. We expect these to be replayed and the only
> # hints within the window
> insert_c1c2(session, n=(0, 100), consistency=ConsistencyLevel.ONE)
> 
> # Let hint window pass
> time.sleep(15)
> 
> # Re-enable and disable the node. Prior to CASSANDRA-14215 this 
> should make the hint window on node1 reset.
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> node2.nodetool('disablegossip')
> 
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120, from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to shutdown"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> def endpoint_downtime(node_to_query, node):
> mbean = make_mbean('net', type='Gossiper')
> with JolokiaAgent(node_to_query) as jmx:
> return jmx.execute_method(mbean, 
> 'getEndpointDowntime(java.lang.String)', [node])
> 
> while endpoint_downtime(node1, "127.0.0.2") <= 5000:
> time.sleep(1)
> 
> # Second round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(100, 200), consistency=ConsistencyLevel.ONE)
> 
> # Restart node1. Prior to CASSANDRA-14215 this would reset node1's 
> hint window.
> node1.stop()
> node1.start(wait_for_binary_proto=True, wait_other_notice=False)
> session = self.patient_exclusive_cql_connection(node1)
> 

[jira] [Updated] (CASSANDRASC-46) Migrate minikube to testcontainers for integration tests

2022-10-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRASC-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CASSANDRASC-46:
--
Labels: pull-request-available  (was: )

> Migrate minikube to testcontainers for integration tests
> 
>
> Key: CASSANDRASC-46
> URL: https://issues.apache.org/jira/browse/CASSANDRASC-46
> Project: Sidecar for Apache Cassandra
>  Issue Type: Improvement
>  Components: Configuration
>Reporter: Francisco Guerrero
>Assignee: Francisco Guerrero
>Priority: Normal
>  Labels: pull-request-available
>
> The existing Cassandra Sidecar integration testing suite uses Minikube to 
> provision a Cassandra service and it performs tests against the running 
> database. This database runs on Minikube.
> A new alternative is to use [testcontainers|https://www.testcontainers.org], 
> which requires Docker to run tests. The concept is similar, but the benefit 
> is that *testcontainers* is well integrated into the java ecosystem and it 
> works well with junit5. By replacing Minikube with {{testcontainers}} we can 
> simplify the setup process and reduce the complexity of the setup.
> Additionally, {{testcontainers}} is supported as part of the testing 
> infrastructure inside 
> [CircleCI|https://www.testcontainers.org/supported_docker_environment/continuous_integration/circle_ci/].
>  Currently, our Minikube tests are broken both locally and in CircleCI. 
> Moving to {{testcontainers}} would also unblock us for further development.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Assigned] (CASSANDRA-17939) CircleCI: Automatically detect and repeat new or modified JUnit tests

2022-10-14 Thread Josh McKenzie (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-17939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Josh McKenzie reassigned CASSANDRA-17939:
-

Assignee: Andres de la Peña

> CircleCI: Automatically detect and repeat new or modified JUnit tests
> -
>
> Key: CASSANDRA-17939
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17939
> Project: Cassandra
>  Issue Type: Task
>  Components: CI
>Reporter: Andres de la Peña
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>
> The purpose of this ticket is adding a new CircleCI job that automatically 
> detects new or modified test classes and runs them repeatedly. That way we 
> wouldn't need to manually specify those tests with {{.circleci/generate.sh}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17930) Ensure CircleCI and ASF Jenkins CI are aligned

2022-10-14 Thread Josh McKenzie (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617882#comment-17617882
 ] 

Josh McKenzie commented on CASSANDRA-17930:
---

CASSANDRA-17939 has some follow-up tickets that might intersect w/what we're 
looking at here: see my last comment.

May end up needing a CI epic to roll all this up under; seem to be quite a few 
moving parts.

> Ensure CircleCI and ASF Jenkins CI are aligned
> --
>
> Key: CASSANDRA-17930
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17930
> Project: Cassandra
>  Issue Type: Task
>  Components: CI
>Reporter: Ekaterina Dimitrova
>Assignee: Derek Chen-Becker
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 4.x
>
>
> As discussed in this 
> [thread|https://lists.apache.org/list.html?d...@cassandra.apache.org] the 
> Cassandra community wants to see CircleCI and ASF CI being aligned - running 
> the same tests, configurations, all tests.
> A few examples of discrepancies we already noticed:
>  * utests_system_keyspace_directory run only in CircleCI - CASSANDRA-17145
>  * dtest-large run only in Jenkins
>  * simulator tests run only in CircleCI
>  * In a quick skim I think I didn't see 
> [these|https://github.com/apache/cassandra-builds/blob/trunk/build-scripts/cassandra-dtest-pytest.sh#L84-L89]
>  runs too in CircleCI - dtest-offheap, dtest-large, dtest-large-novnode
>  * packaging is also only tested in Jenkins as far as I recall
> And these are only a few examples on top of my mind. I am sure we will find 
> more. We also need to verify the way we call those tests is correct and 
> matches in both CIs. (I was looking to solve similar discrepancy in 
> CASSANDRA-17912)
> Some info on our tests suites here - 
> [https://cassandra.apache.org/_/development/testing.html,]
>  [cassandra-builds repo|https://github.com/apache/cassandra-builds] where our 
> test images reside and the Jenkins build scripts, which I already referred 
> to. 
> CircleCI info can be found in the readme which resides in the in-tree folder 
> dedicated to configuration and scripts for Circle CI - 
> [https://github.com/apache/cassandra/tree/trunk/.circleci]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17939) CircleCI: Automatically detect and repeat new or modified JUnit tests

2022-10-14 Thread Josh McKenzie (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617880#comment-17617880
 ] 

Josh McKenzie commented on CASSANDRA-17939:
---

Couple nits on the review (looks like the old top level repeat count was left 
in the script help output and readme.md) but otherwise +1.

I'll make a note for us to create some follow up tickets about massaging the 
output of generate.sh on the following fronts:
 # Tuning parallelism levels per job (David's findings indicate there's a more 
optimal / tighter bound for this)
 # Renaming of jobs to be more indicative of their function
 # Updating documentation w/guidance on using circle ([how to 
commit|https://cassandra.apache.org/_/development/how_to_commit.html], 
[testing|https://cassandra.apache.org/_/development/testing.html])

Thanks for being patient w/all my probing on this Andres. I've been using this 
ecosystem quite a bit in the past year and have accumulated some opinions as a 
user. :)

> CircleCI: Automatically detect and repeat new or modified JUnit tests
> -
>
> Key: CASSANDRA-17939
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17939
> Project: Cassandra
>  Issue Type: Task
>  Components: CI
>Reporter: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>
> The purpose of this ticket is adding a new CircleCI job that automatically 
> detects new or modified test classes and runs them repeatedly. That way we 
> wouldn't need to manually specify those tests with {{.circleci/generate.sh}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRASC-46) Migrate minikube to testcontainers for integration tests

2022-10-14 Thread Francisco Guerrero (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRASC-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francisco Guerrero updated CASSANDRASC-46:
--
Summary: Migrate minikube to testcontainers for integration tests  (was: 
Migrate minikube to testcontainers)

> Migrate minikube to testcontainers for integration tests
> 
>
> Key: CASSANDRASC-46
> URL: https://issues.apache.org/jira/browse/CASSANDRASC-46
> Project: Sidecar for Apache Cassandra
>  Issue Type: Improvement
>  Components: Configuration
>Reporter: Francisco Guerrero
>Assignee: Francisco Guerrero
>Priority: Normal
>
> The existing Cassandra Sidecar integration testing suite uses Minikube to 
> provision a Cassandra service and it performs tests against the running 
> database. This database runs on Minikube.
> A new alternative is to use [testcontainers|https://www.testcontainers.org], 
> which requires Docker to run tests. The concept is similar, but the benefit 
> is that *testcontainers* is well integrated into the java ecosystem and it 
> works well with junit5. By replacing Minikube with {{testcontainers}} we can 
> simplify the setup process and reduce the complexity of the setup.
> Additionally, {{testcontainers}} is supported as part of the testing 
> infrastructure inside 
> [CircleCI|https://www.testcontainers.org/supported_docker_environment/continuous_integration/circle_ci/].
>  Currently, our Minikube tests are broken both locally and in CircleCI. 
> Moving to {{testcontainers}} would also unblock us for further development.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRASC-46) Migrate minikube to testcontainers

2022-10-14 Thread Francisco Guerrero (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRASC-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617876#comment-17617876
 ] 

Francisco Guerrero commented on CASSANDRASC-46:
---

This change would introduce a new test-only dependency, with MIT 
[License|https://raw.githubusercontent.com/testcontainers/testcontainers-java/main/LICENSE].
 Since this is a test-only dependency this should be fine to add.

> Migrate minikube to testcontainers
> --
>
> Key: CASSANDRASC-46
> URL: https://issues.apache.org/jira/browse/CASSANDRASC-46
> Project: Sidecar for Apache Cassandra
>  Issue Type: Improvement
>  Components: Configuration
>Reporter: Francisco Guerrero
>Assignee: Francisco Guerrero
>Priority: Normal
>
> The existing Cassandra Sidecar integration testing suite uses Minikube to 
> provision a Cassandra service and it performs tests against the running 
> database. This database runs on Minikube.
> A new alternative is to use [testcontainers|https://www.testcontainers.org], 
> which requires Docker to run tests. The concept is similar, but the benefit 
> is that *testcontainers* is well integrated into the java ecosystem and it 
> works well with junit5. By replacing Minikube with {{testcontainers}} we can 
> simplify the setup process and reduce the complexity of the setup.
> Additionally, {{testcontainers}} is supported as part of the testing 
> infrastructure inside 
> [CircleCI|https://www.testcontainers.org/supported_docker_environment/continuous_integration/circle_ci/].
>  Currently, our Minikube tests are broken both locally and in CircleCI. 
> Moving to {{testcontainers}} would also unblock us for further development.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRASC-46) Migrate minikube to testcontainers

2022-10-14 Thread Francisco Guerrero (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRASC-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francisco Guerrero updated CASSANDRASC-46:
--
Change Category: Quality Assurance
 Complexity: Normal
Component/s: Configuration
 Status: Open  (was: Triage Needed)

> Migrate minikube to testcontainers
> --
>
> Key: CASSANDRASC-46
> URL: https://issues.apache.org/jira/browse/CASSANDRASC-46
> Project: Sidecar for Apache Cassandra
>  Issue Type: Improvement
>  Components: Configuration
>Reporter: Francisco Guerrero
>Assignee: Francisco Guerrero
>Priority: Normal
>
> The existing Cassandra Sidecar integration testing suite uses Minikube to 
> provision a Cassandra service and it performs tests against the running 
> database. This database runs on Minikube.
> A new alternative is to use [testcontainers|https://www.testcontainers.org], 
> which requires Docker to run tests. The concept is similar, but the benefit 
> is that *testcontainers* is well integrated into the java ecosystem and it 
> works well with junit5. By replacing Minikube with {{testcontainers}} we can 
> simplify the setup process and reduce the complexity of the setup.
> Additionally, {{testcontainers}} is supported as part of the testing 
> infrastructure inside 
> [CircleCI|https://www.testcontainers.org/supported_docker_environment/continuous_integration/circle_ci/].
>  Currently, our Minikube tests are broken both locally and in CircleCI. 
> Moving to {{testcontainers}} would also unblock us for further development.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRASC-46) Migrate minikube to testcontainers

2022-10-14 Thread Francisco Guerrero (Jira)
Francisco Guerrero created CASSANDRASC-46:
-

 Summary: Migrate minikube to testcontainers
 Key: CASSANDRASC-46
 URL: https://issues.apache.org/jira/browse/CASSANDRASC-46
 Project: Sidecar for Apache Cassandra
  Issue Type: Improvement
Reporter: Francisco Guerrero
Assignee: Francisco Guerrero


The existing Cassandra Sidecar integration testing suite uses Minikube to 
provision a Cassandra service and it performs tests against the running 
database. This database runs on Minikube.

A new alternative is to use [testcontainers|https://www.testcontainers.org], 
which requires Docker to run tests. The concept is similar, but the benefit is 
that *testcontainers* is well integrated into the java ecosystem and it works 
well with junit5. By replacing Minikube with {{testcontainers}} we can simplify 
the setup process and reduce the complexity of the setup.

Additionally, {{testcontainers}} is supported as part of the testing 
infrastructure inside 
[CircleCI|https://www.testcontainers.org/supported_docker_environment/continuous_integration/circle_ci/].
 Currently, our Minikube tests are broken both locally and in CircleCI. Moving 
to {{testcontainers}} would also unblock us for further development.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17948) Get warning and errors through virtual tables

2022-10-14 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617819#comment-17617819
 ] 

Brandon Williams commented on CASSANDRA-17948:
--

This looks ready for CI, if there isn't already a run.

> Get warning and errors through virtual tables
> -
>
> Key: CASSANDRA-17948
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17948
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Feature/Virtual Tables
>Reporter: Michiel Saelen
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.x
>
> Attachments: signature.asc
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The warnings and errors are currently only accessible through Cassandra logs. 
> Automating the monitoring of the nodes would be much easier/secure if we can 
> make use of virtual tables to get the logs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17634) Fix test: dtest-upgrade.upgrade_tests.drop_compact_storage_upgrade_test.TestDropCompactStorage.test_drop_compact_storage_mixed_cluster

2022-10-14 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617813#comment-17617813
 ] 

Brandon Williams commented on CASSANDRA-17634:
--

bq. With the timeouts, where the test has many sleeps hence it's flakiness
bq. With sstable and CF mistracking. This may be a side effect of the above?

There are some best practices we've learned that this test isn't following in a 
few places, namely: waiting for schema agreement, and not waiting for the 
binary proto in once instance during upgrades.  I think these can explain the 
above behaviors, modulo environmental timeouts, and [I have a patch for 
this|https://github.com/driftx/cassandra-dtest/tree/CASSANDRA-17634].  
[!https://ci-cassandra.apache.org/job/Cassandra-devbranch/1999/badge/icon!|https://ci-cassandra.apache.org/blue/organizations/jenkins/Cassandra-devbranch/detail/Cassandra-devbranch/1999/pipeline]

In 4.1, there's another error:

bq. ERROR [NonPeriodicTasks:1] 2022-10-06 04:20:13,633 LogTransaction.java:398 
- SSTableTidier ran with no existing data file for an sstable that was not new

Unfortunately, the 
[logs|https://nightlies.apache.org/cassandra/cassandra-4.1/Cassandra-4.1-dtest-upgrade/157/Cassandra-4.1-dtest-upgrade/label=cassandra-dtest,split=15/]
 are empty and this is the only run we have.  Apparently there is another cause 
for the empty logs after CASSANDRA-17901 :(


> Fix test: 
> dtest-upgrade.upgrade_tests.drop_compact_storage_upgrade_test.TestDropCompactStorage.test_drop_compact_storage_mixed_cluster
> --
>
> Key: CASSANDRA-17634
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17634
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local/Compaction
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Normal
> Fix For: 4.0.x, 4.1.x
>
>
> From 
> https://ci-cassandra.apache.org/job/Cassandra-4.1/24/testReport/dtest-upgrade.upgrade_tests.drop_compact_storage_upgrade_test/TestDropCompactStorage/test_drop_compact_storage_mixed_cluster/
> {noformat}
> Error Message
> test teardown failure
> Stacktrace
> Unexpected error found in node logs (see stdout for full details). Errors: 
> [[node2] 'ERROR [NonPeriodicTasks:1] 2022-05-18 11:36:18,780 
> LogTransaction.java:398 - SSTableTidier ran with no existing data file for an 
> sstable that was not new', [node2] 'ERROR [NonPeriodicTasks:1] 2022-05-18 
> 11:36:18,788 LogTransaction.java:250 - Unable to delete 
> /home/cassandra/cassandra/cassandra-dtest/tmp/dtest-vk4cgziz/test/node2/data0/system_schema/columns-24101c25a2ae3af787c1b40ee1aca33f/nb_txn_upgradesstables_bbe470a4-d69e-11ec-8d33-579a578037c7.log
>  as it does not exist, see debug log file for stack trace', [node2] 'ERROR 
> [NonPeriodicTasks:1] 2022-05-18 11:36:18,821 LogTransaction.java:250 - Unable 
> to delete 
> /home/cassandra/cassandra/cassandra-dtest/tmp/dtest-vk4cgziz/test/node2/data0/system_schema/columns-24101c25a2ae3af787c1b40ee1aca33f/nb_txn_upgradesstables_bbe4709a-d69e-11ec-8d33-579a578037c7.log
>  as it does not exist, see debug log file for stack trace', [node2] 'ERROR 
> [CompactionExecutor:1] 2022-05-18 11:36:29,589 JVMStabilityInspector.java:68 
> - Exception in thread 
> Thread[CompactionExecutor:1,5,CompactionExecutor]\njava.lang.NullPointerException:
>  null\n\tat 
> org.apache.cassandra.db.lifecycle.LogFile.makeRecord(LogFile.java:346)\n\tat 
> org.apache.cassandra.db.lifecycle.LogFile.contains(LogFile.java:381)\n\tat 
> org.apache.cassandra.db.lifecycle.LogTransaction.obsoleted(LogTransaction.java:183)\n\tat
>  
> org.apache.cassandra.db.lifecycle.Helpers.prepareForObsoletion(Helpers.java:136)\n\tat
>  
> org.apache.cassandra.db.lifecycle.LifecycleTransaction.doPrepare(LifecycleTransaction.java:206)\n\tat
>  
> org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.prepareToCommit(Transactional.java:168)\n\tat
>  
> org.apache.cassandra.io.sstable.SSTableRewriter.doPrepare(SSTableRewriter.java:386)\n\tat
>  
> org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.prepareToCommit(Transactional.java:168)\n\tat
>  
> org.apache.cassandra.db.compaction.writers.CompactionAwareWriter.doPrepare(CompactionAwareWriter.java:106)\n\tat
>  
> org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.prepareToCommit(Transactional.java:168)\n\tat
>  
> org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.finish(Transactional.java:179)\n\tat
>  
> org.apache.cassandra.db.compaction.writers.CompactionAwareWriter.finish(CompactionAwareWriter.java:116)\n\tat
>  
> org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:218)\n\tat
>  
> 

[jira] [Comment Edited] (CASSANDRA-17939) CircleCI: Automatically detect and repeat new or modified JUnit tests

2022-10-14 Thread Jira


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617784#comment-17617784
 ] 

Andres de la Peña edited comment on CASSANDRA-17939 at 10/14/22 3:08 PM:
-

It seems that 100 is an acceptable number for long unit tests.

As for Python upgrade dtests, those can be super slow if one tries to run an 
entire test file, as in {{cql_tests.py}}. Those files contain many tests that 
are applied to different upgrade paths, so they can take ages. Also, the syntax 
for running particular tests isn't super friendly, as in 
{{upgrade_tests/cql_tests.py::TestCQLNodes2RF1_Upgrade_current_4_0_x_To_indev_4_0_x::test_counters}}.
 So I'm setting the default to only 25 iterations, which should be something 
between 1h and 2h for a large test file and MIDRES. After all, there isn't 
automatic detection of Python dtests so the users will probably manually 
provide their own count.

Given that we have different counts for each test family, I'm removing the 
default generic {{REPEATED_TESTS_COUNT}}. That can only lead to 
misunderstandings if one gets used to it and then get surprised when some 
especially long tests ignore it. Also, the way it worked was quite hacky and 
I'm afraid it could fail in future versions of CircleCI CLI.

I'm also leaving a single {{REPEATED_TESTS_STOP_ON_FAILURE}} env var instead of 
one per family of tests. This is so partly to avoid the error-prone approach 
for default env vars. Also I can't see a case where we could have different 
setting per family of tests, and the less vars we have the better.

The {{readme.md}} file is updated to describe the multiplexer env vars.
 
||Patch||CI without test changes||CI with test changes||
|[trunk|https://github.com/adelapena/cassandra/tree/17939-trunk-generate]|[j8_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/c53a390b-d08a-4a2a-b63d-3e6d35f9984b]
 
[j11_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/d6f51790-a17d-44cd-810f-fc679b1f5379]
 
[j8_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/3f4a47dd-1bfa-4a5c-a384-85d708fbd41c]
 
[j11_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/66462337-401d-4f87-9b5b-b1c016c50613]|[j8_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2247/workflows/a88e2d87-828c-4fe5-84de-d190d294c2a4]
 
[j11_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2247/workflows/9ff67d2f-cae6-4fc8-9537-376a6cd267e1]
 
[j8_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2247/workflows/7cb93de7-b54f-46e9-aac1-ab45b736caaa]
 
[j11_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2247/workflows/9f083479-f7c9-4a94-9bcb-b2f47851a5e3]|

[~jmckenzie] if you are ok with the changes I can start preparing the patches 
for all the other branches (since 3.0).


was (Author: adelapena):
It seems that 100 is an acceptable number for long unit tests.

As for Python upgrade dtests, those can be super slow if one tries to run an 
entire test file, as in {{{}cql_tests.py{}}}. Those files contains many tests 
that are applied to different upgrade paths, so they can take ages. Also, the 
syntax for running particular tests isn't super friendly, as in 
{{{}REPEATED_UPGRADE_DTESTS: 
cql_tests.py::TestCQLNodes2RF1_Upgrade_current_4_0_x_To_indev_4_0_x{}}}. So I'm 
setting the default to only 25 iterations, which should be something between 1h 
and 2h for a large test file. After all, there isn't automatic detection of 
Python dtests so the users will probably manually provide their own count.

Given that we have different counts for each test family, I'm removing the 
default generic {{{}REPEATED_TESTS_COUNT{}}}. That can only lead to 
misunderstandings if one gets used to it and then get surprised when some 
especially long tests ignore it. Also, the way it worked was quite hacky and 
I'm afraid it could fail in future versions of CircleCI CLI.

I'm also leaving a single {{REPEATED_TESTS_STOP_ON_FAILURE}} env var instead of 
one per family of tests. This is so partly to avoid the error-prone approach 
for default env vars. Also I can't see a case where we could have different 
setting per family of tests, and the less vars we have the better.

The {{readme.md}} file is updated to describe the multiplexer env vars.
 
||Patch||CI without test changes||CI with test changes||
|[trunk|https://github.com/adelapena/cassandra/tree/17939-trunk-generate]|[j8_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/c53a390b-d08a-4a2a-b63d-3e6d35f9984b]
 
[j11_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/d6f51790-a17d-44cd-810f-fc679b1f5379]
 

[jira] [Comment Edited] (CASSANDRA-17939) CircleCI: Automatically detect and repeat new or modified JUnit tests

2022-10-14 Thread Jira


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617784#comment-17617784
 ] 

Andres de la Peña edited comment on CASSANDRA-17939 at 10/14/22 3:02 PM:
-

It seems that 100 is an acceptable number for long unit tests.

As for Python upgrade dtests, those can be super slow if one tries to run an 
entire test file, as in {{{}cql_tests.py{}}}. Those files contains many tests 
that are applied to different upgrade paths, so they can take ages. Also, the 
syntax for running particular tests isn't super friendly, as in 
{{{}REPEATED_UPGRADE_DTESTS: 
cql_tests.py::TestCQLNodes2RF1_Upgrade_current_4_0_x_To_indev_4_0_x{}}}. So I'm 
setting the default to only 25 iterations, which should be something between 1h 
and 2h for a large test file. After all, there isn't automatic detection of 
Python dtests so the users will probably manually provide their own count.

Given that we have different counts for each test family, I'm removing the 
default generic {{{}REPEATED_TESTS_COUNT{}}}. That can only lead to 
misunderstandings if one gets used to it and then get surprised when some 
especially long tests ignore it. Also, the way it worked was quite hacky and 
I'm afraid it could fail in future versions of CircleCI CLI.

I'm also leaving a single {{REPEATED_TESTS_STOP_ON_FAILURE}} env var instead of 
one per family of tests. This is so partly to avoid the error-prone approach 
for default env vars. Also I can't see a case where we could have different 
setting per family of tests, and the less vars we have the better.

The {{readme.md}} file is updated to describe the multiplexer env vars.
 
||Patch||CI without test changes||CI with test changes||
|[trunk|https://github.com/adelapena/cassandra/tree/17939-trunk-generate]|[j8_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/c53a390b-d08a-4a2a-b63d-3e6d35f9984b]
 
[j11_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/d6f51790-a17d-44cd-810f-fc679b1f5379]
 
[j8_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/3f4a47dd-1bfa-4a5c-a384-85d708fbd41c]
 
[j11_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/66462337-401d-4f87-9b5b-b1c016c50613]|[j8_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2247/workflows/a88e2d87-828c-4fe5-84de-d190d294c2a4]
 
[j11_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2247/workflows/9ff67d2f-cae6-4fc8-9537-376a6cd267e1]
 
[j8_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2247/workflows/7cb93de7-b54f-46e9-aac1-ab45b736caaa]
 
[j11_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2247/workflows/9f083479-f7c9-4a94-9bcb-b2f47851a5e3]|

[~jmckenzie] if you are ok with the changes I can start preparing the patches 
for all the other branches (since 3.0).


was (Author: adelapena):
It seems that 100 is an acceptable number for long unit tests.

As for Python upgrade dtests, those can be super slow if one tries to run an 
entire test file, as in {{{}cql_tests.py{}}}. Those files contains many tests 
that are applied to different upgrade paths, so they can take ages. Also, the 
syntax for running particular tests isn't super friendly, as in 
{{{}REPEATED_UPGRADE_DTESTS: 
cql_tests.py::TestCQLNodes2RF1_Upgrade_current_4_0_x_To_indev_4_0_x{}}}. So I'm 
setting the default to only 25 iterations, which should be something between 1h 
and 2h for a large test file. After all, there isn't automatic detection of 
Python dtests so the users will probably manually provide their own count.

Given that we have different counts for each test family, I'm removing the 
default generic {{{}REPEATED_TESTS_COUNT{}}}. That can only lead to 
misunderstandings if one gets used to it and then get surprised when some 
especially long tests ignore it. Also, the way it worked was quite hacky and 
I'm afraid in future versions of CircleCI CLI.

I'm also leaving a single {{REPEATED_TESTS_STOP_ON_FAILURE}} env var instead of 
one per family of tests. This is so partly to avoid the error-prone approach 
for default env vars. Also I can't see a case where we could have different 
setting per family of tests, and the less vars we have the better.

The {{readme.md}} file is updated to describe the multiplexer env vars.
 
||Patch||CI without test changes||CI with test changes||
|[trunk|https://github.com/adelapena/cassandra/tree/17939-trunk-generate]|[j8_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/c53a390b-d08a-4a2a-b63d-3e6d35f9984b]
 
[j11_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/d6f51790-a17d-44cd-810f-fc679b1f5379]
 

[jira] [Commented] (CASSANDRA-17939) CircleCI: Automatically detect and repeat new or modified JUnit tests

2022-10-14 Thread Jira


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617784#comment-17617784
 ] 

Andres de la Peña commented on CASSANDRA-17939:
---

It seems that 100 is an acceptable number for long unit tests.

As for Python upgrade dtests, those can be super slow if one tries to run an 
entire test file, as in {{{}cql_tests.py{}}}. Those files contains many tests 
that are applied to different upgrade paths, so they can take ages. Also, the 
syntax for running particular tests isn't super friendly, as in 
{{{}REPEATED_UPGRADE_DTESTS: 
cql_tests.py::TestCQLNodes2RF1_Upgrade_current_4_0_x_To_indev_4_0_x{}}}. So I'm 
setting the default to only 25 iterations, which should be something between 1h 
and 2h for a large test file. After all, there isn't automatic detection of 
Python dtests so the users will probably manually provide their own count.

Given that we have different counts for each test family, I'm removing the 
default generic {{{}REPEATED_TESTS_COUNT{}}}. That can only lead to 
misunderstandings if one gets used to it and then get surprised when some 
especially long tests ignore it. Also, the way it worked was quite hacky and 
I'm afraid in future versions of CircleCI CLI.

I'm also leaving a single {{REPEATED_TESTS_STOP_ON_FAILURE}} env var instead of 
one per family of tests. This is so partly to avoid the error-prone approach 
for default env vars. Also I can't see a case where we could have different 
setting per family of tests, and the less vars we have the better.

The {{readme.md}} file is updated to describe the multiplexer env vars.
 
||Patch||CI without test changes||CI with test changes||
|[trunk|https://github.com/adelapena/cassandra/tree/17939-trunk-generate]|[j8_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/c53a390b-d08a-4a2a-b63d-3e6d35f9984b]
 
[j11_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/d6f51790-a17d-44cd-810f-fc679b1f5379]
 
[j8_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/3f4a47dd-1bfa-4a5c-a384-85d708fbd41c]
 
[j11_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2248/workflows/66462337-401d-4f87-9b5b-b1c016c50613]|[j8_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2247/workflows/a88e2d87-828c-4fe5-84de-d190d294c2a4]
 
[j11_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2247/workflows/9ff67d2f-cae6-4fc8-9537-376a6cd267e1]
 
[j8_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2247/workflows/7cb93de7-b54f-46e9-aac1-ab45b736caaa]
 
[j11_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2247/workflows/9f083479-f7c9-4a94-9bcb-b2f47851a5e3]|

[~jmckenzie] if you are ok with the changes I can start preparing the patches 
for all the other branches (since 3.0).

> CircleCI: Automatically detect and repeat new or modified JUnit tests
> -
>
> Key: CASSANDRA-17939
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17939
> Project: Cassandra
>  Issue Type: Task
>  Components: CI
>Reporter: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>
> The purpose of this ticket is adding a new CircleCI job that automatically 
> detects new or modified test classes and runs them repeatedly. That way we 
> wouldn't need to manually specify those tests with {{.circleci/generate.sh}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-17891) Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window

2022-10-14 Thread Brandon Williams (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-17891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams updated CASSANDRA-17891:
-
Reviewers: Brandon Williams
   Status: Review In Progress  (was: Needs Committer)

> Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window
> ---
>
> Key: CASSANDRA-17891
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17891
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Ekaterina Dimitrova
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.1.x, 4.x
>
>
> hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window is flaky
>  
> {code:java}
> self = 
> @since('4.1')
> def test_hintedhandoff_window(self):
> """
> Test that we only store at a maximum the hint window worth of 
> hints.
> Prior to CASSANDRA-14309 we would store another window worth of 
> hints
> if the down node was brought up and then taken back down 
> immediately.
> We would also store another window of hints on a live node if the 
> live
> node was restarted.
> @jira_ticket CASSANDRA-14309
> """
> 
> # hint_window_persistent_enabled is set to true by default
> self.cluster.set_configuration_options({'max_hint_window_in_ms': 
> 1,
> 'hinted_handoff_enabled': 
> True,
> 'max_hints_delivery_threads': 
> 1,
> 'hints_flush_period_in_ms': 
> 100, })
> self.cluster.populate(2).start()
> node1, node2 = self.cluster.nodelist()
> session = self.patient_cql_connection(node1)
> create_ks(session, 'ks', 2)
> create_c1c2_table(self, session)
> 
> # Stop handoff until very end and take node2 down for first round of 
> hints
> node1.nodetool('pausehandoff')
> 
> node2.nodetool('disablebinary')
> node2.watch_log_for(["Stop listening for CQL clients"], timeout=120)
> 
> node2.nodetool('disablegossip')
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120)
> node1.watch_log_for(["state jump to shutdown"], timeout=120)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> # First round of hints. We expect these to be replayed and the only
> # hints within the window
> insert_c1c2(session, n=(0, 100), consistency=ConsistencyLevel.ONE)
> 
> # Let hint window pass
> time.sleep(15)
> 
> # Re-enable and disable the node. Prior to CASSANDRA-14215 this 
> should make the hint window on node1 reset.
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> node2.nodetool('disablegossip')
> 
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120, from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to shutdown"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> def endpoint_downtime(node_to_query, node):
> mbean = make_mbean('net', type='Gossiper')
> with JolokiaAgent(node_to_query) as jmx:
> return jmx.execute_method(mbean, 
> 'getEndpointDowntime(java.lang.String)', [node])
> 
> while endpoint_downtime(node1, "127.0.0.2") <= 5000:
> time.sleep(1)
> 
> # Second round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(100, 200), consistency=ConsistencyLevel.ONE)
> 
> # Restart node1. Prior to CASSANDRA-14215 this would reset node1's 
> hint window.
> node1.stop()
> node1.start(wait_for_binary_proto=True, wait_other_notice=False)
> session = self.patient_exclusive_cql_connection(node1)
> session.execute('USE ks')
> # Third round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(200, 300), consistency=ConsistencyLevel.ONE)
> 
> # Enable node2 and wait for hints to be replayed
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_2)
> 
> 

[jira] [Commented] (CASSANDRA-17891) Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window

2022-10-14 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617638#comment-17617638
 ] 

Brandon Williams commented on CASSANDRA-17891:
--

Does the sleep need to be such a long time?  It seems like it could be shorter 
since we are looping.

> Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window
> ---
>
> Key: CASSANDRA-17891
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17891
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Ekaterina Dimitrova
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.1.x, 4.x
>
>
> hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window is flaky
>  
> {code:java}
> self = 
> @since('4.1')
> def test_hintedhandoff_window(self):
> """
> Test that we only store at a maximum the hint window worth of 
> hints.
> Prior to CASSANDRA-14309 we would store another window worth of 
> hints
> if the down node was brought up and then taken back down 
> immediately.
> We would also store another window of hints on a live node if the 
> live
> node was restarted.
> @jira_ticket CASSANDRA-14309
> """
> 
> # hint_window_persistent_enabled is set to true by default
> self.cluster.set_configuration_options({'max_hint_window_in_ms': 
> 1,
> 'hinted_handoff_enabled': 
> True,
> 'max_hints_delivery_threads': 
> 1,
> 'hints_flush_period_in_ms': 
> 100, })
> self.cluster.populate(2).start()
> node1, node2 = self.cluster.nodelist()
> session = self.patient_cql_connection(node1)
> create_ks(session, 'ks', 2)
> create_c1c2_table(self, session)
> 
> # Stop handoff until very end and take node2 down for first round of 
> hints
> node1.nodetool('pausehandoff')
> 
> node2.nodetool('disablebinary')
> node2.watch_log_for(["Stop listening for CQL clients"], timeout=120)
> 
> node2.nodetool('disablegossip')
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120)
> node1.watch_log_for(["state jump to shutdown"], timeout=120)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> # First round of hints. We expect these to be replayed and the only
> # hints within the window
> insert_c1c2(session, n=(0, 100), consistency=ConsistencyLevel.ONE)
> 
> # Let hint window pass
> time.sleep(15)
> 
> # Re-enable and disable the node. Prior to CASSANDRA-14215 this 
> should make the hint window on node1 reset.
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> node2.nodetool('disablegossip')
> 
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120, from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to shutdown"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> def endpoint_downtime(node_to_query, node):
> mbean = make_mbean('net', type='Gossiper')
> with JolokiaAgent(node_to_query) as jmx:
> return jmx.execute_method(mbean, 
> 'getEndpointDowntime(java.lang.String)', [node])
> 
> while endpoint_downtime(node1, "127.0.0.2") <= 5000:
> time.sleep(1)
> 
> # Second round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(100, 200), consistency=ConsistencyLevel.ONE)
> 
> # Restart node1. Prior to CASSANDRA-14215 this would reset node1's 
> hint window.
> node1.stop()
> node1.start(wait_for_binary_proto=True, wait_other_notice=False)
> session = self.patient_exclusive_cql_connection(node1)
> session.execute('USE ks')
> # Third round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(200, 300), consistency=ConsistencyLevel.ONE)
> 
> # Enable node2 and wait for hints to be replayed
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> 

[jira] [Updated] (CASSANDRA-17891) Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window

2022-10-14 Thread Stefan Miklosovic (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-17891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Miklosovic updated CASSANDRA-17891:
--
Test and Documentation Plan: updated dtest
 Status: Patch Available  (was: In Progress)

I think I fixed it. I did 2 runs on 500 repeats without a failure.

[https://github.com/apache/cassandra-dtest/pull/204]
[https://app.circleci.com/pipelines/github/instaclustr/cassandra/1424/workflows/508b9d65-5b16-475c-894d-6405792cc9a5]
[https://app.circleci.com/pipelines/github/instaclustr/cassandra/1423/workflows/1d977064-122e-4f4f-970e-1363ce79f55a]

> Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window
> ---
>
> Key: CASSANDRA-17891
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17891
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Ekaterina Dimitrova
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.1.x, 4.x
>
>
> hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window is flaky
>  
> {code:java}
> self = 
> @since('4.1')
> def test_hintedhandoff_window(self):
> """
> Test that we only store at a maximum the hint window worth of 
> hints.
> Prior to CASSANDRA-14309 we would store another window worth of 
> hints
> if the down node was brought up and then taken back down 
> immediately.
> We would also store another window of hints on a live node if the 
> live
> node was restarted.
> @jira_ticket CASSANDRA-14309
> """
> 
> # hint_window_persistent_enabled is set to true by default
> self.cluster.set_configuration_options({'max_hint_window_in_ms': 
> 1,
> 'hinted_handoff_enabled': 
> True,
> 'max_hints_delivery_threads': 
> 1,
> 'hints_flush_period_in_ms': 
> 100, })
> self.cluster.populate(2).start()
> node1, node2 = self.cluster.nodelist()
> session = self.patient_cql_connection(node1)
> create_ks(session, 'ks', 2)
> create_c1c2_table(self, session)
> 
> # Stop handoff until very end and take node2 down for first round of 
> hints
> node1.nodetool('pausehandoff')
> 
> node2.nodetool('disablebinary')
> node2.watch_log_for(["Stop listening for CQL clients"], timeout=120)
> 
> node2.nodetool('disablegossip')
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120)
> node1.watch_log_for(["state jump to shutdown"], timeout=120)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> # First round of hints. We expect these to be replayed and the only
> # hints within the window
> insert_c1c2(session, n=(0, 100), consistency=ConsistencyLevel.ONE)
> 
> # Let hint window pass
> time.sleep(15)
> 
> # Re-enable and disable the node. Prior to CASSANDRA-14215 this 
> should make the hint window on node1 reset.
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> node2.nodetool('disablegossip')
> 
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120, from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to shutdown"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> def endpoint_downtime(node_to_query, node):
> mbean = make_mbean('net', type='Gossiper')
> with JolokiaAgent(node_to_query) as jmx:
> return jmx.execute_method(mbean, 
> 'getEndpointDowntime(java.lang.String)', [node])
> 
> while endpoint_downtime(node1, "127.0.0.2") <= 5000:
> time.sleep(1)
> 
> # Second round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(100, 200), consistency=ConsistencyLevel.ONE)
> 
> # Restart node1. Prior to CASSANDRA-14215 this would reset node1's 
> hint window.
> node1.stop()
> node1.start(wait_for_binary_proto=True, wait_other_notice=False)
> session = self.patient_exclusive_cql_connection(node1)
> session.execute('USE ks')
>   

[jira] [Updated] (CASSANDRA-17891) Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window

2022-10-14 Thread Stefan Miklosovic (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-17891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Miklosovic updated CASSANDRA-17891:
--
Status: Needs Committer  (was: Patch Available)

> Fix hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window
> ---
>
> Key: CASSANDRA-17891
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17891
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Ekaterina Dimitrova
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.1.x, 4.x
>
>
> hintedhandoff_test.py::TestHintedHandoff::test_hintedhandoff_window is flaky
>  
> {code:java}
> self = 
> @since('4.1')
> def test_hintedhandoff_window(self):
> """
> Test that we only store at a maximum the hint window worth of 
> hints.
> Prior to CASSANDRA-14309 we would store another window worth of 
> hints
> if the down node was brought up and then taken back down 
> immediately.
> We would also store another window of hints on a live node if the 
> live
> node was restarted.
> @jira_ticket CASSANDRA-14309
> """
> 
> # hint_window_persistent_enabled is set to true by default
> self.cluster.set_configuration_options({'max_hint_window_in_ms': 
> 1,
> 'hinted_handoff_enabled': 
> True,
> 'max_hints_delivery_threads': 
> 1,
> 'hints_flush_period_in_ms': 
> 100, })
> self.cluster.populate(2).start()
> node1, node2 = self.cluster.nodelist()
> session = self.patient_cql_connection(node1)
> create_ks(session, 'ks', 2)
> create_c1c2_table(self, session)
> 
> # Stop handoff until very end and take node2 down for first round of 
> hints
> node1.nodetool('pausehandoff')
> 
> node2.nodetool('disablebinary')
> node2.watch_log_for(["Stop listening for CQL clients"], timeout=120)
> 
> node2.nodetool('disablegossip')
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120)
> node1.watch_log_for(["state jump to shutdown"], timeout=120)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> # First round of hints. We expect these to be replayed and the only
> # hints within the window
> insert_c1c2(session, n=(0, 100), consistency=ConsistencyLevel.ONE)
> 
> # Let hint window pass
> time.sleep(15)
> 
> # Re-enable and disable the node. Prior to CASSANDRA-14215 this 
> should make the hint window on node1 reset.
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> node2.nodetool('disablegossip')
> 
> node2.watch_log_for(["Announcing shutdown", "state jump to 
> shutdown"], timeout=120, from_mark=log_mark_node_2)
> node1.watch_log_for(["state jump to shutdown"], timeout=120, 
> from_mark=log_mark_node_1)
> 
> log_mark_node_1 = node1.mark_log()
> log_mark_node_2 = node2.mark_log()
> 
> def endpoint_downtime(node_to_query, node):
> mbean = make_mbean('net', type='Gossiper')
> with JolokiaAgent(node_to_query) as jmx:
> return jmx.execute_method(mbean, 
> 'getEndpointDowntime(java.lang.String)', [node])
> 
> while endpoint_downtime(node1, "127.0.0.2") <= 5000:
> time.sleep(1)
> 
> # Second round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(100, 200), consistency=ConsistencyLevel.ONE)
> 
> # Restart node1. Prior to CASSANDRA-14215 this would reset node1's 
> hint window.
> node1.stop()
> node1.start(wait_for_binary_proto=True, wait_other_notice=False)
> session = self.patient_exclusive_cql_connection(node1)
> session.execute('USE ks')
> # Third round of inserts. We do not expect hints to be stored.
> insert_c1c2(session, n=(200, 300), consistency=ConsistencyLevel.ONE)
> 
> # Enable node2 and wait for hints to be replayed
> node2.nodetool('enablegossip')
> node2.watch_log_for(["state jump to NORMAL"], timeout=120, 
> from_mark=log_mark_node_2)
> 
> node2.nodetool('enablebinary')
> 

[jira] [Commented] (CASSANDRA-17773) Incorrect cassandra.logdir on Debian systems

2022-10-14 Thread Berenguer Blasi (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17617557#comment-17617557
 ] 

Berenguer Blasi commented on CASSANDRA-17773:
-

Just double chekcing: Is anybody on top of this one?

> Incorrect cassandra.logdir on Debian systems
> 
>
> Key: CASSANDRA-17773
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17773
> Project: Cassandra
>  Issue Type: Bug
>  Components: Packaging
>Reporter: Eric Evans
>Priority: Normal
>  Labels: lhf
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1-rc
>
>
> The Debian packaging patches bin/cassandra to use /var/log/cassandra for 
> logs, it does so conditionally however, only if CASSANDRA_LOG_DIR is unset. 
> This occurs _after_ cassandra-env.sh is sourced though, which also sets 
> CASSANDRA_LOG_DIR if unset (to $CASSANDRA_HOME/logs).  The result is that 
> -Dcassandra.lodir is set to /usr/share/cassandra/logs on Debian systems.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org