av9ash/GitBugs huggingface dataset:
Bug: Flaky ViewTest
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 01/Jul/21 04:57
Resolved: 05/Jul/21 09:21

ViewTest has been [failing|https://ci-cassandra.apache.org/job/Cassandra-4.0/113/testReport/junit/org.apache.cassandra.cql3/ViewTest/testFrozenCollectionsWithComplicatedInnerType/] every now and then on the 4.0 line. Being so close to having 0 faky failures I want to scratch that itch so I propose we split it like we did with ViewComplexTest.
Bug: Incompatible constants related to forwarded writes
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 13/Jul/21 02:09
Resolved: 13/Jul/21 15:30

The header for forwarded writes changed from 3.x.x->4.0. In C* 3.x.x headers are "FWD_TO" or "FWD_FROM" while in C* 4.0 headers are "FORWARD_TO" or "FORWARD_FROM". Therefore, I suppose that there will be a failure during rolling upgrade from 3.x.x to 4.0.
Bug: Unable to successfully export and Import data in cassandra 
Status: Resolved
Priority: Normal
Resolution: Invalid
Created: 30/Jul/21 12:36
Resolved: 30/Jul/21 13:12

I have a table in a cassandra server, and that is hosted somewhere. I exported the data from that cassandra instance into a CSV file, using following commands 

 
cqlsh> capture '~/state_bkp.csv' Now capturing query output to u'/home/ramu /state_bkp.csv'. cqlsh> SELECT * FROM "<<keyspace>>"."<<table>>" WHERE ("systemId" = '2MT931A92K'); cqlsh> capture off
 
The select query has one VARCHAR column and 4 BLOB columns.
 
This creates a massive file of 22.4 MB.  
 
Now I am importing this file into cassandra of my localhost.
 
COPY <<keyspace>>.<<table>> FROM '/home/ramu/state_bkp.csv' WITH DELIMITER='|' AND HEADER=TRUE;
 
 
This however fails to insert data into the destination table. It fails with an error.
 
 
`non-hexadecimal number found in fromhex() arg at position 0, given up without retries
Failed to process 5 rows; failed rows written to` import_<<keyspace>>.<<table>>.err
 
This happens to every query that I want to export on this table.
Bug: nightlies.a.o usage is too high
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 19/Jul/21 14:26
Resolved: 24/Jul/21 21:17

Gavin [reports|https://the-asf.slack.com/archives/CS6CA748J/p1626704126045500] that we're using over 1TB here and our documention is published in multiple locations "some in Cassandra$x.$y and some in cassandra$x,$y"
Bug: cassandra_to_gcs operator data type inconsistent
Status: Resolved
Priority: Normal
Resolution: Invalid
Created: 22/Jul/21 22:48
Resolved: 22/Jul/21 23:26

In cassandra_to_gcs.py, `convert_value()` function actually converts bytes and UUID types from Cassandra into strings, but the `CQL_TYPE_MAP` maps bytes, UUID and TIMEUUID from Cassandra into BYTES type in BigQuery, which causes the field value and field schema type inconsistent in BigQuery.
Bug: Clear pending ranges for a SHUTDOWN peer
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 12/Jul/21 15:32
Resolved: 20/Jul/21 18:42

If a node involved in a MOVE operation should fail, peers can sometimes maintain pending ranges for it even when it has left the ring and/or been replaced (in practice until the peer is next bounced). This in turn can lead to bogus unavailable responses to clients if a replica for the any of the pending ranges should go down.

If the moving node crashes hard, a subsequent replacement will correctly fail as long as cassandra.consistent.rangemovement is set to true because the new node will learn the MOVING status from the remaining peers. A graceful shutdown, however, causes that status to be replaced with SHUTDOWN, but doesn't update TokenMetadata, so pending ranges remain for the down node, even after it has been removed from the ring.
Bug: cqlsh shows old version native protocol but other nodes of cluster shows correct
Status: Resolved
Priority: Normal
Resolution: Invalid
Created: 12/Jul/21 13:45
Resolved: 12/Jul/21 13:59

Team,

we got a weird issue, we are getting below error 

com.datastax.driver.core.exceptions.CodecNotFoundException: Codec not found for requested operation: ['org.apache.cassandra.db.marshal.ShortType' <-> java.lang.Short]

com.datastax.driver.core.Connection - DEBUG: Got unsupported protocol version error from /<ipad>:9042 for version V4 server supports version V3

cassandra]$ cqlsh <ipadress> -u cassandra
Password:
\Connected to social-graph-cassandra-cluster at <ip>:9042.
[cqlsh 5.0.1 | Cassandra 3.11.5 | CQL spec 3.4.4 | Native protocol {color:#FF0000}v3{color}]
Use HELP for help.
cassandra@cqlsh> select native_protocol_version from system.local; native_protocol_version
-------------------------
 {color:#FF0000}4{color}(1 rows)
cassandra@cqlsh>

but other clusters shows correct version of Native protocols.

we are not using any cqlshrc config files as well. any help in identifying above issue would be appreciated.

Regards,

Srinivas
Bug: Incorrect Java doc description on org.apache.cassandra.schema
Status: Triage Needed
Priority: Normal
Created: 04/Jul/21 03:35

See below the Java doc for Difference.SHALLOW enum.
{code:java}
/**
 *
 * Two schema objects are considered to differ DEEP-ly if their direct structure is altered.
 *
 * For example, if a table T is altered to add a new column, a different compaction strategy, or a new description,
 * then it will differ SHALLOW-ly from the original.
 */
{code}
Which the first sentence should be "Two schema objects are considered to differ *SHALLOW-ly* if their direct structure is altered."
Bug: Migrate build from Ant to Maven/Gradle
Status: In Progress
Priority: Low
Created: 29/Sep/21 20:23

h2. Overview

Cassandra relies onto {{ant}} build tool which is used there for a long time. Even though it is pretty stable, reliable and well-document, {{ant}} is not being actively developed. Releases are rare and new features/fixes appear rarely. For example, JUnit 5 support was implemented in Sep 2019 whereas the JUnit 5 itself was released in 2017.

Moreover, ant seems to be morally obsolete:
 * no-one (?) starts new projects with {{ant}}
 * less and less people have hands-on experience with the tool

h2. Goals

The aim of this ticket is to explore two alternatives for the project: Maven, Gradle. Most of the community seem to prefer Maven at this stage, but I'd like us to be unbiased and make a fair comparison. The points to pay attention to:
 * build speed
 * support of necessary plugins (without ugly workarounds)
 * IDE integration (will need to get feedback from the community)
 * ability to improve tests speed (including both multi-threading and parallelization on multiple servers)

h2. Steps
 # mimic the existing build via Gradle
 # mimic the existing build via Maven
 # make speed comparison
 # ask community to test IDE integration and try to address existing concerns
 # check ability to parallelize tests
 # make a conclusion / vote
 # update necessary project documentation
 # migrate trunk (not yet sure regarding older branches, but probably them too) to the new build tool 

 

The description is preliminary. We may update it in the future once we have more details.
Bug: Jvm-dtest race on closing and log messages
Status: Open
Priority: Low
Created: 01/Jul/21 07:16

Failure of [IPMembershipTest|https://ci-cassandra.apache.org/job/Cassandra-4.0.0/40/testReport/junit/org.apache.cassandra.distributed.test/IPMembershipTest/startupNewIP/]:

{noformat}
Uncaught exceptions were thrown during test
{noformat}

led me to investigate the [logs|https://nightlies.apache.org/cassandra/cassandra-4.0.0/Cassandra-4.0.0-jvm-dtest/37/Cassandra-4.0.0-jvm-dtest/jdk=jdk_11_latest,label=cassandra,split=6/build/test/logs/org.apache.cassandra.distributed.test.IPMembershipTest/%3cmain%3e/%3cmain%3e/] a bit where it seems we can be in a 'closed' state but trying to perform operations such as logging still

{noformat}
ERROR [RequestResponseStage-8] <main> 2021-06-30 08:18:31,211 uncaught exception in thread Thread[RequestResponseStage-8,5,node3]
java.lang.IllegalStateException: Can't load ch.qos.logback.core.status.ErrorStatus. Instance class loader is already closed.
	at org.apache.cassandra.distributed.shared.InstanceClassLoader.loadClassInternal(InstanceClassLoader.java:93)
	at org.apache.cassandra.distributed.shared.InstanceClassLoader.loadClass(InstanceClassLoader.java:87)
	at ch.qos.logback.core.spi.ContextAwareBase.addError(ContextAwareBase.java:105)
	at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88)
	at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51)
	at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:270)
	at ch.qos.logback.classic.Logger.callAppenders(Logger.java:257)
	at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:421)
	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
	at ch.qos.logback.classic.Logger.log(Logger.java:765)
	at io.netty.util.internal.logging.LocationAwareSlf4JLogger.log(LocationAwareSlf4JLogger.java:50)
	at io.netty.util.internal.logging.LocationAwareSlf4JLogger.debug(LocationAwareSlf4JLogger.java:115)
	at io.netty.buffer.PoolThreadCache.free(PoolThreadCache.java:224)
	at io.netty.buffer.PooledByteBufAllocator$PoolThreadLocalCache.onRemoval(PooledByteBufAllocator.java:516)
	at io.netty.buffer.PooledByteBufAllocator$PoolThreadLocalCache.onRemoval(PooledByteBufAllocator.java:483)
	at io.netty.util.concurrent.FastThreadLocal.remove(FastThreadLocal.java:256)
	at io.netty.util.concurrent.FastThreadLocal.removeAll(FastThreadLocal.java:67)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:32)
	at java.base/java.lang.Thread.run(Thread.java:834)
{noformat}

Log attached
Bug: Documentation for: CEP-9 Make SSLContext creation pluggable
Status: Resolved
Priority: Low
Resolution: Fixed
Created: 13/Sep/21 22:41
Resolved: 25/Feb/22 06:46

This ticket is to specifically cover the documentation for the pluggable SSLContext creation code changes done as part of CASSANDRA-16666. As a general agreement on that ticket, it is decided that we should separate the documentation work from the implementation due to the parallel on-going documentation revamp (see CASSANDRA-16763).
Bug: Make -Dtest.methods optional in all Ant test targets
Status: Resolved
Priority: Low
Resolution: Fixed
Created: 29/Sep/21 17:24
Resolved: 01/Oct/21 14:32

The Ant build file contains several targets to run specific tests:
 * testsome
 * long-testsome
 * burn-testsome
 * cql-test-some
 * stress-test-some
 * test-jvm-dtest-some

These targets take two arguments, {{test.name}} and {{test.methods}}. The first argument, {{test.name}}, is always mandatory. However, {{test.methods}} can be either mandatory or optional depending on the target and the project branch. For example, in {{testsome}} the argument is mandatory in 3.0 and 3.11 and optional in 4.0 and trunk. Also, in trunk {{test.methods}} is optional for all the targets except {{cql-test-some}}.

The purpose of this ticket is making {{test.methods}} consistently optional for all the {{*some}} targets.
Bug: Implement Virtual Tables for Auth Caches
Status: Resolved
Priority: Low
Resolution: Fixed
Created: 03/Sep/21 08:31
Resolved: 10/Nov/21 08:29

{{NodeTool}} commands for Auth Caches invalidation were implemented as a part of CASSANDRA-16404 ticket. While discussing that ticket it was agreed that there is a need to develop the same kind of functionality through Vitrual Tables. Unfortunately, VT did not have {{TRUNCATE}} and {{DELETE}} support. And CASSANDRA-16806 was created for that reason. Once it is completed, further work can be started.

The goal of this ticket is to create VTs for the following caches:
 * {{CredentialsCache}}
 * {{JmxPermissionsCache}}
 * {{NetworkPermissionsCache}}
 * {{PermissionsCache}}
 * {{RolesCache}}

The VTs should support reading from and modification of the in the Auth Caches.
Bug: Add resource flags to CircleCi config generation script
Status: Resolved
Priority: Low
Resolution: Fixed
Created: 20/Aug/21 10:33
Resolved: 01/Sep/21 14:39

Currently we have three versions of the CircleCI config file using different resources. Changing the resources configuration is as easy as copying the desired template file, for example:
{code}
cp .circleci/config.yml.MIDRES .circleci/config.yml
{code}
If we want to make changes to the file, for example to set a specific dtest repo or running the test multiplexer, we can run the provided generation script, copy the template file and probably exclude the additional changes:
{code}
# edit config-2_1.yml
.circleci/generate.sh
cp .circleci/config.yml.MIDRES .circleci/config.yml
# undo the changes in config.yml.LOWRES, config.yml.MIDRES and config.yml.HIGHRES
{code}
A very common alternative to this is just editing the environment variables in the automatically generated {{config.yml}} file, which are repeated some 19 times across the file:
{code}
cp .circleci/config.yml.MIDRES .circleci/config.yml
# edit config.yml, where env vars are repeated
{code}
I think we could do this slightly easier by adding a set of flags to the generation script to apply the resources patch directly to {{config.yml}}, without changing the templates:
{code}
# edit config-2_1.yml
.circleci/generate.sh -m
{code}
This has the advantage of not requiring manually editing the automatically generated file and also providing some validation.
Bug: DROP Table should not recycle active CommitLog segments
Status: Resolved
Priority: Low
Resolution: Fixed
Created: 23/Sep/21 09:24
Resolved: 04/Oct/21 20:20

Right now, DROP TABLE recycles all active CL segments and explicitly marks intervals as clean for all dropping tables. I believe that this is not necessary.

Recycling of CL segments was introduced in CASSANDRA-3578. Back then, it was necessary to recycle all active segments because:
1. CommitLog reused old segments after they were clean. This is no longer the case, I believe, since CASSANDRA-6809.
2. CommitLog segments must have been closed and recycled on {{DROP TABLE}} to avoid resurrecting data if a table with the same name is created. This was an issue because tables didn't have unique ids yet (CASSANDRA-5202).

Given that {{DROP TABLE}} triggers flush, which in turn cleans CL intervals in Keyspace#unloadCF, I think that we can avoid the call to {{forceRecycleAll}} there.
Bug: Add tests for Resource fromName/getName
Status: Resolved
Priority: Low
Resolution: Fixed
Created: 25/Sep/21 10:19
Resolved: 29/Sep/21 14:23

As a part of CASSANDRA-16977 we identified a problem functions ({{FunctionResource.fromName}}) parsing logic. We agreed that {{Resource.fromName/}}{{Resource.getName}} should be symmetrical. I'd like to ensure that by having a corresponding unit test.
Bug: DOC - Documentation page for Hints has a broken table
Status: Resolved
Priority: Low
Resolution: Duplicate
Created: 19/Aug/21 10:31
Resolved: 31/Mar/22 09:20

The Cassandra Documentation page for Hints:

[https://cassandra.apache.org/doc/latest/cassandra/operating/hints.html]

has a problem with Table 1: Settings for Hints.

On the second row of the table, part of the Description column, the example, has "wrapped" into the next Cell in the second row, in the Default Value column.

 

This has then resulted in all the following cells from the third row onwards being bumped along one Cell. 

 

The Setting Column contains the value of the Default Value Column from the previous row

The Description Column contains the value of the Setting Column

The Default Value Column contains the value of the Description Column
Bug: Cassandra 3.11.2 windows remote share as data files directory 
Status: Open
Priority: Urgent
Created: 16/Mar/23 18:24

Hi Team,

 

We are using windows 2018 server for running Cassandra 3.11.2 version with remote windows server shared folder as data file directory path and we are getting below error.

 

ERROR [CompactionExecutor:1] 2023-03-10 09:18:44,511 DefaultFSErrorHandler.java:92 - Exiting forcefully due to file system exception on startup, disk failure policy "stop" org.apache.cassandra.io.FSReadError: java.io.IOException: There are no more files at org.apache.cassandra.io.util.FileUtils.getCanonicalPath(FileUtils.java:303)

It is working inbetween.
Bug: Initial Merge of Accord Feature Branch to Trunk
Status: In Progress
Priority: High
Created: 24/Jan/23 21:51

Once we've resolved our feature flags situation (see CASSANDRA-18195) and in-flight work (see CASSANDRA-18192) we want before merge, here is the rough plan for getting {{cep-15-accord}} merged to {{trunk}}:

1.) Run cep-15-accord pre-squash against CircleCI to establish a baseline.
2.) Squash ninja commits out of cep-15-accord and rerun tests pre-rebase.
2.) Rebase cep-15-accord to trunk and rerun tests.
4.) Merge cep-15-accord to trunk if tests are clean and there are no public objections.
Bug: Documentation work to accomplish for C* 5.0 launch
Status: Resolved
Priority: High
Resolution: Fixed
Created: 03/Feb/23 22:25
Resolved: 02/Jan/25 08:34

This epic describes the major items that must be completed by the time Apache C* 5.0 launches. Tickets will be added as required. 

Cassandra 5.0 Doc Plan: https://docs.google.com/document/d/1FAACcAxtV9qLJS05RLt85S_6Gb4C4t4g9DhmfLufjOk/edit?usp=sharing
Bug: Implement Concurrent Quiescent Checker 
Status: Resolved
Priority: High
Resolution: Fixed
Created: 09/Mar/23 16:05
Resolved: 14/Mar/23 20:24

It is possible to implement a concurrent quiescent checker, which allows for a high degree of concurrency, while allowing to pinpoint partition state precisely. 

Additional minor improvements:

      * formatting
      * thread shutdown on failed run creation
      * idempotent query execution
      * retry delay
Bug: Drop JDK8 Support
Status: Resolved
Priority: High
Resolution: Fixed
Created: 10/Feb/23 07:00
Resolved: 25/Jul/23 01:40

* update Jenkins builds scripts (Cassandra-builds) for trunk to build and run tests only with JDK 11 and JDK 17 - both Jenkins-dev and post-commit
 * the JDK11+17 config files and script in cassandra/.circleci should replace the default J8+J11 test config files and script
 * Cassandra trunk build.xml and conf files should be updated - JDK8 removed everywhere
 * Any tickets blocked on this one and ready to commit should be committed
 * Revert this change in CCM - [https://github.com/riptano/ccm/commit/6e71061146f7ae67b84ccd2b1d90d7319b640e4c#diff-0999a90fd83b66b6840af0bbd8afd1ebd9648e135b0665692fa0f523325a1058L984]
 * Docs will be updated later in CASSANDRA-18233

NOTE: Python Upgrade tests were already switched to 11 in this [change|https://github.com/apache/cassandra-dtest/commit/52053200e75d3e6718c03bfa68232dfb94f9a566#diff-31d0989c90471274d54ccce871e5ea977ba477d1b55ee13be6f399fd844c16cfR171], so I _think_ there is no other change pending in cassandra-dtest repo
Bug: Cassandra Debian Repository is not available and will be redirected to landing.jfrog.com
Status: Resolved
Priority: High
Resolution: Fixed
Created: 22/Mar/23 09:14
Resolved: 22/Mar/23 16:50

Hi,
Debian Repo ist not available and redirected to landing.jfrog.com

Time flies when you’re having fun.
Your 14-day trial may be over, but you have options!

Could you pls fix that?

Thanks in advance
Zoltan
Bug: Feature Flag for Accord Transactions
Status: Resolved
Priority: High
Resolution: Fixed
Created: 24/Jan/23 21:47
Resolved: 01/Feb/23 19:51

This will be a prerequisite for the initial merge of the {{cep-15-accord}} branch to trunk. Two basic things should happen:

1.) Make sure there’s a flag in the YAML that rejects CQL transactions when disabled, similar to what we do right now with MVs, transient replication, etc.

2.) Audit the C* Accord integration for threads we don’t want starting when Accord is disabled.
Bug: Prefer snakeyaml's SafeConstructor over Constructor
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 11/Jan/23 21:44
Resolved: 24/Jan/23 12:40

CVE-2022-1471 allows RCE through the Constructor class.  While this isn't a concern since yaml is only used for configuration, it is simple enough to switch to SafeConstructor and harden the server a little more.
Bug: CEP-15: (C*) Add git submodule for Accord
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 26/Jan/23 20:08
Resolved: 18/Feb/23 01:11

As talked about in dev@ thread "Intra-project dependencies”, we talked about adding git submodules but before doing this had to work out a few issues first; this ticket is to track this work.

Goals
* when checking out an older commit, or pulling in newer commits, the submodule should also be updated automatically
* release artifact must include the submodule and must be able to build without issue
* build.xml must be updated to build the submodule
* build.xml must be updated to release the submodule jar
Bug: WEBSITE - Update contributor instructions for requesting a Jira account
Status: Open
Priority: Normal
Created: 02/Mar/23 10:07

The ASF Infrastructure team have [announced a new self-service site|https://infra.apache.org/blog/brand-new-selfserve-page.html] which provides the ability for new contributors to request a public Jira account through https://selfserve.apache.org/jira-account.html.

The instructions need to be updated on the following pages:
* [Contributing to Cassandra|https://cassandra.apache.org/_/development/index.html] page
* [Contributing Code Changes|https://cassandra.apache.org/_/development/patches.html] (Patches) page
* [Reporting Bugs|https://cassandra.apache.org/_/bugs.html] page
* *Reporting Bugs* section of the [Community|https://cassandra.apache.org/_/community.html#how-to-contribute] page
Bug: Update the client drivers list
Status: Triage Needed
Priority: Normal
Created: 17/Feb/23 00:07

Currently, the docs has a page that lists client drivers by language.  It's got a lot of entries that, on further investigation, haven't been updated in several years.  It would be good to either indicate the activity on the driver/project or remove the older ones so that people don't get the wrong impression and use something that won't serve them well.

https://cassandra.apache.org/doc/latest/cassandra/getting_started/drivers.html
Bug: Provide Accord design and API documentation
Status: In Progress
Priority: Normal
Created: 24/Jan/23 19:35

Would be great if we have at minimum:
- white paper in a form of an AsciiDoc or Markdown somewhere in the project tree
- all interfaces and all methods in {{acccord.api}} have API docs explaining the requirements for the implementations
- enums and their values across the project are documented
- interfaces, abstract classes, or classes that do not inherit from anything in the project have at least some class level explanation

Eventually, it would really awesome if concepts from the whitepaper are somehow referenced in the code (or vice-versa). It would make it much easier to understand the implementation and I believe it would improve reuse of this project for external applications