You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Marcus Eriksson (JIRA)" <ji...@apache.org> on 2018/01/06 17:59:00 UTC
[jira] [Commented] (CASSANDRA-14139) Acquire read lock before
accessing CompactionStrategyManager fields
[ https://issues.apache.org/jira/browse/CASSANDRA-14139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16314785#comment-16314785 ]
Marcus Eriksson commented on CASSANDRA-14139:
---------------------------------------------
* for the {{supportsEarlyOpen}} method we can instead store the boolean in {{startup}} like we do with {{fanout}} and {{shouldDefragment}}
* in trunk, for {{getRepaired}}, {{getUnrepaired}} and {{getPendingRepairManagers}} we don't need the readlock - we return the list directly (and when refreshing we clear the same list) - to make this safe we would need to copy the list and return the copy, but those methods are only used in tests so I doubt we need it (maybe add a comment though)
> 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