av9ash/GitBugs huggingface dataset:
Bug: CircleCI UnitTests error - java.lang.OutOfMemoryError: Java heap space
Status: Resolved
Priority: Normal
Resolution: Won't Fix
Created: 24/Jul/20 18:10
Resolved: 19/Aug/20 19:30

We persistently see on the latest CircleCI trunk the following error:

(MIDRES)

 
{code:java}
BUILD FAILED
/tmp/cassandra/build.xml:1982: The following error occurred while executing this line:
/tmp/cassandra/build.xml:1866: java.lang.OutOfMemoryError: Java heap space
 at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:68)
 at java.lang.StringBuffer.<init>(StringBuffer.java:128)
 at com.sun.org.apache.xml.internal.utils.FastStringBuffer.getString(FastStringBuffer.java:872)
 at com.sun.org.apache.xml.internal.dtm.ref.sax2dtm.SAX2DTM2.getStringValueX(SAX2DTM2.java:2937)
 at com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter.getStringValueX(DOMAdapter.java:284)
 at junit_frames.template$dot$5()
 at junit_frames.applyTemplates5()
 at junit_frames.package()
 at junit_frames.template$dot$0()
 at junit_frames.applyTemplates()
 at junit_frames.applyTemplates()
 at junit_frames.transform()
 at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:620)
 at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:730)
 at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:343)
 at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:201)
 at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:870)
 at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:408)
 at org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.transform(AggregateTransformer.java:281)
 at org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator.execute(XMLResultAggregator.java:157)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
 at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
 at org.apache.tools.ant.Task.perform(Task.java:350)
 at org.apache.tools.ant.taskdefs.Sequential$$Lambda$149/1543351283.accept(Unknown Source)
 at java.util.Vector.forEach(Vector.java:1275)
 at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:67)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
 at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Total time: 2 minutes 52 seconds
Exited with code exit status 1
CircleCI received exit code 1
{code}
 

*Example:* [https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/285/workflows/f2722016-2353-4c38-9fd2-8614f6609f55/jobs/1648/parallel-runs/16?filterBy=FAILED]
Bug:  Include ant dtest-jar target in IntelliJ Testing Builds/Runs
Status: Triage Needed
Priority: Normal
Created: 18/Aug/20 21:08

When running in-jvm dtest upgrade tests from inside IntelliJ, if the developer makes changes and does not re-run “ant dtest-jar” the changes will not be visible to the test. This can be fixed by manually running the command or manually adding the ant target to the IntelliJ pre-launch configuration for the test. We can do this automatically as well by modifying the `ide/idea` settings.
Bug: Upgrade json-simple to 1.1.1
Status: Triage Needed
Priority: Normal
Created: 06/Aug/20 22:13

This is the latest version. Also, it avoids dependency conflicts in
projects that have other libraries requiring 1.1.1.

 

See [https://github.com/jagill/cassandra/tree/upgrade-json-simple] for the diff, or the below patch.
Bug: Standardize audit logging and FQL with same options
Status: Triage Needed
Priority: Normal
Created: 03/Aug/20 18:32

In Cassandra 4.0:

 

FQL and audit logging use similar `nodetool` enable commands. But FQL uses:

`nodetool enablefullquerylog <log_dir>`

and audit logging uses:

`nodetool enableauditlog` with no `audit_log_dir` as an option.

 

Additionally, FQL uses `log_dir` in the `cassandra.yaml` file and audit logging uses `audit_logs_dir` (note the plural `logs`). 

Both of these differences will likely lead to user confusion, no matter how well explained in the docs.
Bug: Reference CASSANDRA-12607
Status: Resolved
Priority: Normal
Resolution: Duplicate
Created: 20/Jul/20 10:50
Resolved: 03/Aug/20 06:50

In cassandra 3.11.0 , the issue of commit logs being corrupted is still observed. Will this be fixed in higher versions of Cassandra?

 

02 19:58:33,677 JVMStabilityInspector.java:82 - Exiting due to error while processing commit log during initialization.org.apache.cassandra.db.commitlog.CommitLogReadHandler$CommitLogReadException: Mutation checksum failure at 191598541 in Next section at 191590263 in CommitLog-6-1592895482005.log at org.apache.cassandra.db.commitlog.CommitLogReader.readSection(CommitLogReader.java:344) [apache-cassandra-3.11.0.jar:3.11.0] at org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:201) [apache-cassandra-3.11.0.jar:3.11.0] at org.apache.cassandra.db.commitlog.CommitLogReader.readAllFiles(CommitLogReader.java:84) [apache-cassandra-3.11.0.jar:3.11.0] at org.apache.cassandra.db.commitlog.CommitLogReplayer.replayFiles(CommitLogReplayer.java:140) [apache-cassandra-3.11.0.jar:3.11.0] at org.apache.cassandra.db.commitlog.CommitLog.recoverFiles(CommitLog.java:177) [apache-cassandra-3.11.0.jar:3.11.0] at org.apache.cassandra.db.commitlog.CommitLog.recoverSegmentsOnDisk(CommitLog.java:158) [apache-cassandra-3.11.0.jar:3.11.0] at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:325) [apache-cassandra-3.11.0.jar:3.11.0] at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:600) [apache-cassandra-3.11.0.jar:3.11.0] at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:689) [apache-cassandra-3.11.0.jar:3.11.0][WARN] [main] 2020-07-02 20:31:30,334 DatabaseDescriptor.java:540 - Only 2.339GiB free across all data volumes. Consider adding more capacity to your cluster or removing obsolete snapshots[WARN] [main] 2020-07-02 20:31:30,763 NativeLibrary.java:187 - Unable to lock JVM memory (ENOMEM). This can result in part of the JVM being swapped out, especially with mmapped I/O enabled. Increase RLIMIT_MEMLOCK or run Cassandra as root.[WARN] [main] 2020-07-02 20:31:30,764 StartupChecks.java:127 - jemalloc shared library could not be preloaded to speed up memory allocations[WARN] [main] 2020-07-02 20:31:30,764 StartupChecks.java:201 - Non-Oracle JVM detected.  Some features, such as immediate unmap of compacted SSTables, may not work as intended[WARN] [main] 2020-07-02 20:31:30,786 SigarLibrary.java:174 - Cassandra server running in degraded mode. Is swap disabled? : false,  Address space adequate? : true,  nofile limit adequate? : false, nproc limit adequate? : true [WARN] [main] 2020-07-02 20:31:30,789 StartupChecks.java:265 - Maximum number of memory map areas per process (vm.max_map_count) 65530 is too low, recommended value: 1048575, you can change it with sysctl.
Bug: Cassandra 3.0.21 debian package is half available
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 30/Jul/20 09:53
Resolved: 30/Jul/20 17:46

Hi,

Cassandra 3.0.21 seems to have been released in the debian package repository, as it is selected by an {{apt install cassandra}} however the {{.deb}} is not available in the repository (only the {{.dsc}}):

 
{code:java}
# apt-get install cassandra
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  cassandra-tools
The following packages will be upgraded:
  cassandra cassandra-tools
2 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
Need to get 25.5 MB/25.5 MB of archives.
After this operation, 37.9 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Ign:1 https://dl.bintray.com/apache/cassandra 30x/main amd64 cassandra all 3.0.21
Err:1 http://www.apache.org/dist/cassandra/debian 30x/main amd64 cassandra all 3.0.21
  404  Not Found [IP: 52.58.94.94 443]
E: Failed to fetch http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/cassandra_3.0.21_all.deb  404  Not Found [IP: 52.58.94.94 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
 {code}
 

 Indeed, there's no {{https://dl.bintray.com/apache/cassandra/dist/cassandra/debian/pool/main/c/cassandra/cassandra_3.0.21_all.deb}} file avaible. 

{{cassandra-tools}} 3.0.21 is available, and of course {{cassandra}} 3.0.20 is available though.

My current workaround is to use apt-pinning to pin to 3.0.20 until the problem is resolved.
Bug: Update Home index.html and remove all dead links
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 20/Jul/20 22:06
Resolved: 28/Jul/20 18:18

There are a number of tickets for home page improvement. Do all the work and republish.

Linked to:

CASSANDRA-14128

CASSANDRA-15237

In addition, Mick Semb Wever suggested the following be added to the list of companies using Cassandra:

Can we find links for the following?
 - Key customers: Apple, Netflix, Uber, ING, Cern, Intuit, Fidelity, NY Times, Outbrain, BazaarVoice, Best Buy, Comcast, eBay, Hulu, Sky, Pearson Education, Walmart, Microsoft, Macy's™, McDonalds, Macquarie Bank, GitHub, Spotify, Instagram.
 - Market metrics: Cassandra is used by 40% of the Fortune 100.
Bug: Error while configuring cassandra
Status: Resolved
Priority: Normal
Resolution: Invalid
Created: 19/Jul/20 07:25
Resolved: 20/Jul/20 14:48

Hi All ,

I am pretty new to cassandra..

i am trying to configure it my laptop but  when configuring i write below on CMD

C:\Program Files\cassandra\bin>cassandra

i am getting error 

 

"WARNING! Powershell script execution unavailable.
 Please use 'powershell Set-ExecutionPolicy Unrestricted'
 on this user-account to run cassandra with fully featured
 functionality on this platform.
Starting with legacy startup options
Starting Cassandra Server
The system cannot find the path specified."

 

version:-apache-cassandra-3.11.6

can anyone help me with this.

thank in advance
Bug: TestBootstrap::test_bootstrap_binary_disabled_resumable_bootstrap checks non-existent log messages for 3.0 and 3.11
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 16/Jul/20 18:06
Resolved: 17/Jul/20 16:29

CASSANDRA-14525 added a bit of logging only in trunk that {{TestBootstrap::test_bootstrap_binary_disabled_resumable_bootstrap}} assumes is present in all versions. This should be as simple as making sure we only assert around that on 4.0+.

See https://app.circleci.com/pipelines/github/maedhroz/cassandra/57/workflows/b408ce8a-ee68-47bf-b9f1-eb9541e9827e/jobs/312
Bug: java.nio.file.AccessDeniedException
Status: Resolved
Priority: Normal
Resolution: Not A Problem
Created: 17/Jul/20 05:00
Resolved: 17/Jul/20 07:44


when i installed cassandra with binnary tarball i got an error log like this





ERROR [COMMIT-LOG-ALLOCATOR] 2020-07-17 11:47:33,712 JVMStabilityInspector.java:113 - Exiting due to error while processing commit log during initialization.
org.apache.cassandra.io.FSWriteError: java.nio.file.AccessDeniedException: /var/lib/cassandra/commitlog/CommitLog-7-1594961253708.log
        at org.apache.cassandra.db.commitlog.CommitLogSegment.<init>(CommitLogSegment.java:180)
        at org.apache.cassandra.db.commitlog.MemoryMappedSegment.<init>(MemoryMappedSegment.java:45)
        at org.apache.cassandra.db.commitlog.CommitLogSegment.createSegment(CommitLogSegment.java:137)
        at org.apache.cassandra.db.commitlog.CommitLogSegmentManagerStandard.createSegment(CommitLogSegmentManagerStandard.java:66)
        at org.apache.cassandra.db.commitlog.AbstractCommitLogSegmentManager$1.runMayThrow(AbstractCommitLogSegmentManager.java:114)
        at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.nio.file.AccessDeniedException: /var/lib/cassandra/commitlog/CommitLog-7-1594961253708.log
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
        at java.nio.channels.FileChannel.open(FileChannel.java:287)
        at java.nio.channels.FileChannel.open(FileChannel.java:335)
        at org.apache.cassandra.db.commitlog.CommitLogSegment.<init>(CommitLogSegment.java:175)
        ... 7 common frames omitted
Bug: Extend IInternodeAuthenticator to inspect existing connections
Status: Open
Priority: Normal
Created: 10/Jul/20 17:59

The internode authenticator ({{IInternodeAuthenticator}}) should support inspecting the existing connections and close the connections if no longer permitted. 

It would be useful and necessary for the dynamic internode authenticator implementations, which may stop authenticating connections between some nodes at a later time point. 

The current interface only authenticates on a connection during tcp/nodes handshake. It leaves the existing connection alive and the nodes are still able to communicate, after the authenticator has been updated to not permit connections between the nodes.
Bug: Avoid emitting empty range tombstones from RangeTombstoneList
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 06/Jul/20 16:02
Resolved: 09/Jul/20 14:52

In {{RangeTombstoneList#iterator}} there is a chance we emit empty range tombstones depending on the slice passed in. This can happen during read repair with either an empty slice or with paging and the final page being empty.

This creates problems in RTL if we try to insert a new range tombstone which covers the empty ones;
{code}
Caused by: java.lang.AssertionError
	at org.apache.cassandra.db.RangeTombstoneList.insertFrom(RangeTombstoneList.java:541)
	at org.apache.cassandra.db.RangeTombstoneList.addAll(RangeTombstoneList.java:217)
	at org.apache.cassandra.db.MutableDeletionInfo.add(MutableDeletionInfo.java:141)
	at org.apache.cassandra.db.partitions.AtomicBTreePartition.addAllWithSizeDelta(AtomicBTreePartition.java:137)
	at org.apache.cassandra.db.Memtable.put(Memtable.java:254)
	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1210)
	at org.apache.cassandra.db.Keyspace.applyInternal(Keyspace.java:573)
	at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:421)
	at org.apache.cassandra.db.Mutation.apply(Mutation.java:210)
	at org.apache.cassandra.db.Mutation.apply(Mutation.java:215)
	at org.apache.cassandra.db.Mutation.apply(Mutation.java:224)
	at org.apache.cassandra.cql3.statements.ModificationStatement.executeInternalWithoutCondition(ModificationStatement.java:582)
	at org.apache.cassandra.cql3.statements.ModificationStatement.executeInternal(ModificationStatement.java:572)
{code}
Bug: Follow up CASSANDRA-15685 - IR does not wait for ack on commit and notifies caller of success, which can lead to user submitting preview which could conflict
Status: Open
Priority: Normal
Created: 08/Jul/20 00:43

While working on CASSANDRA-15685, we acknowledged that there is an edge case not handled. If we try to run 

Preview repair isn't allowed to be run concurrently with IR. If we run it right after IR and IR completes before the completion message is handled on the participant; the below is impacted by this race condition.
{code:java}
nodetool repair foo bar
# does not look to be running concurrently with the above IR, since it was notified of success
# but the commit message may not have been seen yet which cause this to be concurrent with the above
nodetool repair foo bar --validate
{code}
See here [https://github.com/apache/cassandra/blob/ec1808a34f9aa5ae0b956c1527828566f4ba2be5/src/java/org/apache/cassandra/repair/consistent/CoordinatorSession.java#L234-L244]. We send the message but don't make sure its ack on.
Bug: CommitLogSegmentManager#sync is doing sync one by one need to be improved
Status: Triage Needed
Priority: Normal
Created: 08/Jul/20 04:59

test machine settings:
 # 24 cores
 # 45G memory
 # maximum disk thoughput can over 500MB/s

 

I was running PeriodicCommitLogStressTest#testFixedSize in that test machine and notice both cpu and io can't be full utilized

PeriodicCommitLogStressTest#testFixedSize was running with CommitLogSyncPeriod set to 10000 (I changed it to match production environment setting) and no compression and no encryption

!image-2020-07-08-12-05-07-746.png!

After some digging I find out it's the sync process can't keep up and when 

lastSyncedAt is far behind all thread doing CommitLog#add will wait until it catch up.

Once catch up, all threads go back continue writing and so on.

The overall IO utilization I guess is about 60% more or less. After introduce a thread pool to do sync parallel instead of doing it one by one. The IO utilization is improved

!image-2020-07-08-12-21-10-369.png!

the IO throughput is more steady (almost always above 400MB) and need less time to reach that throughput
Bug: LEAK Detected in Cassandra
Status: Resolved
Priority: Normal
Resolution: Invalid
Created: 02/Jul/20 12:14
Resolved: 02/Jul/20 13:05

Hi

We are using cassandra in docker environment. So 1 out of 3 cassandra, cassandra docker is restarting continuously. This issue is happening in production setup. 

Then checked system logs and debug logs and found these traceback occur multiple times
{code:java}
ERROR [Reference-Reaper] 2020-06-29 14:40:20,800 Ref.java:229 - LEAK DETECTED: a reference (org.apache.cassandra.utils.concurrent.Ref$State@53581121) to class org.apache.cassandra.io.util.MmappedRegions$Tidier@194489638:/var/lib/cassandra/data/system_schema/indexes-0feb57ac311f382fba6d9024d305702f/md-626-big-Index.db was not released before the reference was garbage collected
DEBUG [SSTableBatchOpen:8] 2020-06-29 14:40:23,698 SSTableReader.java:515 - Opening /var/lib/cassandra/data/system_schema/indexes-0feb57ac311f382fba6d9024d305702f/md-240-big (0.050KiB)
ERROR [SSTableBatchOpen:5] 2020-06-29 14:40:20,801 DebuggableThreadPoolExecutor.java:239 - Error in ThreadPoolExecutor
 java.lang.NullPointerException: null
 at org.apache.cassandra.io.sstable.format.SSTableReader.getFilename(SSTableReader.java:697) ~[apache-cassandra-3.11.5.jar:3.11.5]
 at org.apache.cassandra.io.sstable.format.SSTableReader.open(SSTableReader.java:543) ~[apache-cassandra-3.11.5.jar:3.11.5]
 at org.apache.cassandra.io.sstable.format.SSTableReader.open(SSTableReader.java:385) ~[apache-cassandra-3.11.5.jar:3.11.5]
 at org.apache.cassandra.io.sstable.format.SSTableReader$3.run(SSTableReader.java:570) ~[apache-cassandra-3.11.5.jar:3.11.5]
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_232]
 at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_232]
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_232]
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_232]
 at org.apache.cassandra.concurrent.NamedThreadFactory.lambda$threadLocalDeallocator$0(NamedThreadFactory.java:84) [apache-cassandra-3.11.5.jar:3.11.5]
 at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_232]
{code}
 

 

Can somebody help me out here as it is customer deployed setup
Bug: LEAK Detected in Cassandra
Status: Resolved
Priority: Normal
Resolution: Invalid
Created: 02/Jul/20 12:14
Resolved: 02/Jul/20 13:04

Hi

We are using cassandra docker environment. So 1 out of 3 cassandra, cassandra docker is restarting continuously. This issue is happening in production setup. 

Then checked system logs and debug logs and found these traceback occur multiple times
ERROR [Reference-Reaper] 2020-06-29 14:40:20,800 Ref.java:229 - LEAK DETECTED: a reference (org.apache.cassandra.utils.concurrent.Ref$State@53581121) to class org.apache.cassandra.io.util.MmappedRegions$Tidier@194489638:/var/lib/cassandra/data/system_schema/indexes-0feb57ac311f382fba6d9024d305702f/md-626-big-Index.db was not released before the reference was garbage collectedDEBUG [SSTableBatchOpen:8] 2020-06-29 14:40:23,698 SSTableReader.java:515 - Opening /var/lib/cassandra/data/system_schema/indexes-0feb57ac311f382fba6d9024d305702f/md-240-big (0.050KiB)ERROR [SSTableBatchOpen:5] 2020-06-29 14:40:20,801 DebuggableThreadPoolExecutor.java:239 - Error in ThreadPoolExecutor
java.lang.NullPointerException: null
        at org.apache.cassandra.io.sstable.format.SSTableReader.getFilename(SSTableReader.java:697) ~[apache-cassandra-3.11.5.jar:3.11.5]
        at org.apache.cassandra.io.sstable.format.SSTableReader.open(SSTableReader.java:543) ~[apache-cassandra-3.11.5.jar:3.11.5]
        at org.apache.cassandra.io.sstable.format.SSTableReader.open(SSTableReader.java:385) ~[apache-cassandra-3.11.5.jar:3.11.5]
        at org.apache.cassandra.io.sstable.format.SSTableReader$3.run(SSTableReader.java:570) ~[apache-cassandra-3.11.5.jar:3.11.5]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_232]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_232]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_232]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_232]
        at org.apache.cassandra.concurrent.NamedThreadFactory.lambda$threadLocalDeallocator$0(NamedThreadFactory.java:84) [apache-cassandra-3.11.5.jar:3.11.5]
        at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_232]
Bug: Allow partition scan, querying cluster keys out of order
Status: Resolved
Priority: Normal
Resolution: Duplicate
Created: 01/Jul/20 22:05
Resolved: 02/Jul/20 12:31

 

On the following table
{code:java}
CREATE TABLE actors_by_video (
   video_id TIMEUUID,
   actor_name TEXT,
   character_name TEXT,
   PRIMARY KEY ((video_id), actor_name, character_name)
);{code}
 

The query

 
{code:java}
SELECT * FROM actors_by_video
WHERE video_id = 1234abcd-1111-2222-3333-aaaabbbbcccc
AND character_name = 'The PK Father';{code}
 

fails with the following error:
{color:#de350b}InvalidRequest: Error from server: code=2200 [Invalid query] message="PRIMARY KEY column "character_name" cannot be restricted as preceding column "actor_name" is not restricted {color}

*QUESTION:*

Let's assume this is a query which doesn't occur frequently, so it is not worth to create a new table with the proper Primary Key. However, because the scope of the query is limited within ONE SINGLE partition key. I am willing to accept the performance penalty incurred for that "partition scan".

Would it be possible to allow CQL to allow this query, in a similar fastion than "ALLOW FILTERING" ? But here, to denote a scan within a partition, maybe can we name it "ALLOW PARTITION FILTERING" ?
Bug: Avoid "ALLOW FILTERING" requirement for multiple restricted columns if index can handle them
Status: Triage Needed
Priority: Normal
Created: 02/Jul/20 12:11

When executing following query, "ALLOW FILTERING" is required even if both columns are indexed by SASI and used in {{QueryPlan}}:
bq. SELECT * FROM table WHERE age="20" and address="SF"

We should consider providing a proper {{"QueryPlan"}} under {{"Index"}} interface to avoid "ALLOW FILTERING" when all restricted columns are handled by index.