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

Stefan Miklosovic commented on CASSANDRA-20829:
-----------------------------------------------

[CASSANDRA-20829-trunk|https://github.com/instaclustr/cassandra/tree/CASSANDRA-20829-trunk]
{noformat}
java17_pre-commit_tests                         
  ✓ j17_build                                        9m 38s
  ✓ j17_cqlsh_dtests_py311                           7m 35s
  ✓ j17_cqlsh_dtests_py311_vnode                     7m 10s
  ✓ j17_cqlsh_dtests_py38                            6m 51s
  ✓ j17_cqlsh_dtests_py38_vnode                      7m 10s
  ✓ j17_cqlshlib_cython_tests                       12m 37s
  ✓ j17_cqlshlib_tests                              11m 52s
  ✓ j17_dtests_latest                               45m 34s
  ✓ j17_dtests_vnode                                44m 21s
  ✓ j17_unit_tests_repeat                           32m 51s
  ✓ j17_utests_oa_repeat                            33m 25s
  ✕ j17_dtests                                     1h 0m 5s
  ✕ j17_jvm_dtests                                  34m 59s
      org.apache.cassandra.distributed.test.SSTableLoaderEncryptionOptionsTest 
bulkLoaderSuccessfullyStreamsOverSslWithDeprecatedSslStoragePort
  ✕ j17_jvm_dtests_latest_vnode                     37m 42s
      
org.apache.cassandra.distributed.test.streaming.IndexBuildFailsAfterStreamingTest
 test
      junit.framework.TestSuite 
org.apache.cassandra.distributed.test.accord.MigrationFromAccordReadRaceTest
      junit.framework.TestSuite 
org.apache.cassandra.distributed.test.accord.MigrationFromAccordReadRaceTest
      junit.framework.TestSuite 
org.apache.cassandra.distributed.test.accord.MigrationFromAccordWriteRaceTest
      junit.framework.TestSuite 
org.apache.cassandra.distributed.test.accord.MigrationFromAccordWriteRaceTest
      junit.framework.TestSuite 
org.apache.cassandra.distributed.test.accord.MigrationToAccordWriteRaceTest
      junit.framework.TestSuite 
org.apache.cassandra.distributed.test.accord.MigrationToAccordWriteRaceTest
      org.apache.cassandra.distributed.test.sai.IndexHintsDistributedTest 
testIndexHintsWithAllOldVersion
      junit.framework.TestSuite 
org.apache.cassandra.distributed.test.accord.AccordMigrationTest
      junit.framework.TestSuite 
org.apache.cassandra.distributed.test.accord.AccordMigrationTest
      org.apache.cassandra.distributed.test.SSTableLoaderEncryptionOptionsTest 
bulkLoaderSuccessfullyStreamsOverSslWithDeprecatedSslStoragePort
      
org.apache.cassandra.distributed.test.cql3.FullAccordInteropMultiNodeTokenConflictTest
 test
  ✕ j17_unit_tests                                  18m 22s
      org.apache.cassandra.service.accord.EpochSyncTest test
  ✕ j17_utests_latest                               19m 37s
      org.apache.cassandra.service.accord.EpochSyncTest test
      org.apache.cassandra.net.ConnectionTest testTimeout
      org.apache.cassandra.index.CustomIndexTest testFailing2iFlush
  ✕ j17_utests_oa                                   19m 43s
      org.apache.cassandra.service.accord.EpochSyncTest test
java17_separate_tests                            
  ✓ j17_build                                        10m 2s
  ✓ j17_unit_tests_repeat                            33m 3s
  ✕ j17_dtests                                      40m 14s
      refresh_test.TestRefresh test_refresh_deadlock_startup
java11_pre-commit_tests                         
java11_separate_tests                            
{noformat}

[java17_pre-commit_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/5965/workflows/b17be3ae-0fef-45fb-b6a6-15784db853dd]
[java17_separate_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/5965/workflows/bb172371-5d84-4caf-952c-383212b4fc81]


> Secondary index implementations do not integrate with IndexGCTransaction when 
> compaction contains fully expired SSTables
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-20829
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20829
>             Project: Apache Cassandra
>          Issue Type: Bug
>          Components: Feature/2i Index, Local/Compaction, Local/Compaction/TWCS
>            Reporter: Stefan Miklosovic
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>             Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x
>
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> There is a test (1) which ensures that when data are TTLed and compacted, 
> IndexGCTransaction is aware of that and it will invoke Indexer.removeRow() 
> method eventually.
> However, this is not working properly when we have fully expired SSTables, 
> e.g. as the result of a table being on TWCS and having TTL on that. 
> The reason is that in CompactionTask, we are filtering out fully expired ones 
> (2). These then do not go to the compaction process and then they are not 
> reacted on in listener() (3) which contains this logic (4). Eventually, 
> onRowMerge in IndexGCTransaction will make the diff and in its commit 
> indexer.removeRow(row); will notify 2i about its removal.
>  
> This integration is missing and it is quite a big problem because if there 
> are custom secondary index implementations the fact that SSTables were fully 
> expired is not propagated to them which means that data are never removed 
> from whatever backend they use.
> The solution is to go to the compaction with fully expired SSTables as well 
> _but only if we detected that respective column family has some indexes_
>  
> (1) 
> [https://github.com/apache/cassandra/blob/cassandra-4.1/test/unit/org/apache/cassandra/index/CustomIndexTest.java#L583-L607]
> (2) 
> [https://github.com/apache/cassandra/blob/cassandra-4.1/src/java/org/apache/cassandra/db/compaction/CompactionTask.java#L174]
> (3) 
> [https://github.com/apache/cassandra/blob/cassandra-4.1/src/java/org/apache/cassandra/db/compaction/CompactionIterator.java#L130]
> (4) 
> [https://github.com/apache/cassandra/blob/cassandra-4.1/src/java/org/apache/cassandra/db/compaction/CompactionIterator.java#L235-L252]



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to