cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Motta (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-14139) Acquire read lock before accessing CompactionStrategyManager fields
Date Fri, 29 Dec 2017 18:27:00 GMT

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

Paulo Motta updated CASSANDRA-14139:
------------------------------------
    Status: Patch Available  (was: Open)

It seems we missed grabbing the read lock for some operations on CASSANDRA-13948, what can
cause IndexOutOfBounds/NullPointers such the ones above during compaction strategy reload,
so this patch basically gets the lock on the few methods were not doing it.

CI looks good. Trunk patch is slightly different because there are some additional methods
due to CASSANDRA-9143. Can you take a look [~krummas]? Thanks!

||3.11||trunk||
|[branch|https://github.com/apache/cassandra/compare/cassandra-3.11...pauloricardomg:3.11-14139]|[branch|https://github.com/apache/cassandra/compare/trunk...pauloricardomg:trunk-14139]|
|[testall|https://issues.apache.org/jira/secure/attachment/12904036/3.11-14139-testall.png]|[testall|https://issues.apache.org/jira/secure/attachment/12904038/trunk-14139-testall.png]|
|[dtest|https://issues.apache.org/jira/secure/attachment/12904035/3.11-14139-dtest.png]|[dtest|https://issues.apache.org/jira/secure/attachment/12904037/trunk-14139-dtest.png]|


> Acquire read lock before accessing CompactionStrategyManager fields
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-14139
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14139
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Paulo Motta
>            Assignee: Paulo Motta
>         Attachments: 3.11-14139-dtest.png, 3.11-14139-testall.png, trunk-14139-dtest.png,
trunk-14139-testall.png
>
>
> There are a few methods in {{CompactionStrategyManager}} accessing the repaired/unrepaired
compaction strategy lists without using the read lock, what could cause issues like the one
below:
> {noformat}
> ERROR [CompactionExecutor:1] 2017-12-22 12:17:12,320 CassandraDaemon.java:141 - Exception
in thread Thread[CompactionExecutor:1,5,main]
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 1
>     at java.util.ArrayList.rangeCheck(ArrayList.java:657)
>     at java.util.ArrayList.get(ArrayList.java:433)
>     at org.apache.cassandra.db.compaction.CompactionStrategyManager.supportsEarlyOpen(CompactionStrategyManager.java:1262)
>     at org.apache.cassandra.db.ColumnFamilyStore.supportsEarlyOpen(ColumnFamilyStore.java:558)
>     at org.apache.cassandra.io.sstable.SSTableRewriter.construct(SSTableRewriter.java:119)
>     at org.apache.cassandra.db.compaction.writers.CompactionAwareWriter.<init>(CompactionAwareWriter.java:91)
>     at org.apache.cassandra.db.compaction.writers.DefaultCompactionWriter.<init>(DefaultCompactionWriter.java:57)
>     at org.apache.cassandra.db.compaction.CompactionTask.getCompactionAwareWriter(CompactionTask.java:293)
>     at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:200)
>     at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
>     at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:90)
>     at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:101)
>     at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionCandidate.run(CompactionManager.java:310)
>     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>     at org.apache.cassandra.concurrent.NamedThreadFactory.lambda$threadLocalDeallocator$0(NamedThreadFactory.java:81)
>     at java.lang.Thread.run(Thread.java:748)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message