[
https://issues.apache.org/jira/browse/CASSANDRA-14207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jordan West updated CASSANDRA-14207:
------------------------------------
Description:
A race between e.g. index redistribution and compaction (or memtable flushes
and compaction) can cause the compare and swap of a new {{sasi.conf.View}} in
{{sasi.conf.DataTracker#update}} to fail, leading to recreation of the view and
improper reference counting of an {{SSTableIndex}}. This is because the
side-effects (decrementing the reference count via {{SStableIndex#release}})
occur regardless of if the view is promoted to be the active view.
Code:
[https://github.com/apache/cassandra/blob/cassandra-3.11.1/src/java/org/apache/cassandra/index/sasi/conf/DataTracker.java#L72-L78]
Attached logs and debug output show case where index redistribution and
compaction race. This case was generated using the test provided in
https://issues.apache.org/jira/browse/CASSANDRA-14055
was:
A race between e.g. Index Redistribution and Compaction can cause the compare
and swap of a new {{sasi.conf.View}} in {{sasi.conf.DataTracker#update}} to
fail, leading to recreation of the view and improper reference counting of an
{{SSTableIndex}}. This is because the side-effects (decrementing the reference
count via {{SStableIndex#release}}) occur regardless of if the view is promoted
to be the active view.
Code:
https://github.com/apache/cassandra/blob/cassandra-3.11.1/src/java/org/apache/cassandra/index/sasi/conf/DataTracker.java#L72-L78
Attached logs and debug output show case where index redistribution and
compaction race. This case was generated using the test provided in
https://issues.apache.org/jira/browse/CASSANDRA-14055
> Failed Compare and Swap in SASI's DataTracker#update Can Lead to Improper
> Reference Counting of SSTableIndex
> ------------------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-14207
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14207
> Project: Cassandra
> Issue Type: Bug
> Components: sasi
> Reporter: Jordan West
> Assignee: Jordan West
> Priority: Major
> Attachments: 14207-example-test.patch,
> sasi-invalid-reference-count.rtf
>
>
> A race between e.g. index redistribution and compaction (or memtable flushes
> and compaction) can cause the compare and swap of a new {{sasi.conf.View}} in
> {{sasi.conf.DataTracker#update}} to fail, leading to recreation of the view
> and improper reference counting of an {{SSTableIndex}}. This is because the
> side-effects (decrementing the reference count via {{SStableIndex#release}})
> occur regardless of if the view is promoted to be the active view.
> Code:
> [https://github.com/apache/cassandra/blob/cassandra-3.11.1/src/java/org/apache/cassandra/index/sasi/conf/DataTracker.java#L72-L78]
>
> Attached logs and debug output show case where index redistribution and
> compaction race. This case was generated using the test provided in
> https://issues.apache.org/jira/browse/CASSANDRA-14055
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]