cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8399) Reference Counter exception when dropping user type
Date Mon, 22 Dec 2014 21:46:13 GMT


Benedict commented on CASSANDRA-8399:

The real question is: why are we even trying to obtain a reference here?

Creating and using a scanner is a protected operation; it can be protected by either reference
counting or the OpOrder. But this should be ensured by the operation that creates the scanner,
not the scanner itself. We are leaking resource management into the scanner code that shouldn't
be there. 

We should remove the reference counting all together from this area of code. The fact that
we were blindly acquiring before means that we knew it had to succeed, meaning that it also
was not necessary.

Having two mechanisms for resource management is fine, so long as we don't mix them. A macro
operation needs to be protected by one or the other, and sub-operations should rely on these
macro operations to ensure their protection.

> Reference Counter exception when dropping user type
> ---------------------------------------------------
>                 Key: CASSANDRA-8399
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Philip Thompson
>            Assignee: Joshua McKenzie
>             Fix For: 2.1.3
>         Attachments: 8399_fix_empty_results.txt, node2.log, ubuntu-8399.log
> When running the dtest {{}}
with the current 2.1-HEAD code, very frequently, but not always, when dropping a type, the
following exception is seen:{code}
> ERROR [MigrationStage:1] 2014-12-01 13:54:54,824 - Exception
in thread Thread[MigrationStage:1,5,main]
> java.lang.AssertionError: Reference counter -1 for /var/folders/v3/z4wf_34n1q506_xjdy49gb780000gn/T/dtest-eW2RXj/test/node2/data/system/schema_keyspaces-b0f2235744583cdb9631c43e59ce3676/system-sche
> ma_keyspaces-ka-14-Data.db
>         at
>         at
>         at org.apache.cassandra.utils.MergeIterator.close( ~[main/:na]
>         at org.apache.cassandra.db.ColumnFamilyStore$8.close(
>         at org.apache.cassandra.db.ColumnFamilyStore.filter(
>         at org.apache.cassandra.db.ColumnFamilyStore.getRangeSlice(
>         at org.apache.cassandra.db.ColumnFamilyStore.getRangeSlice(
>         at org.apache.cassandra.db.SystemKeyspace.serializedSchema(
>         at org.apache.cassandra.db.SystemKeyspace.serializedSchema(
>         at org.apache.cassandra.config.Schema.updateVersion( ~[main/:na]
>         at org.apache.cassandra.config.Schema.updateVersionAndAnnounce(
>         at org.apache.cassandra.db.DefsTables.mergeSchema( ~[main/:na]
>         at org.apache.cassandra.db.DefinitionsUpdateVerbHandler$1.runMayThrow(
>         at ~[main/:na]
>         at java.util.concurrent.Executors$ ~[na:1.7.0_67]
>         at ~[na:1.7.0_67]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(
>         at java.util.concurrent.ThreadPoolExecutor$
>         at [na:1.7.0_67]{code}
> Log of the node with the error is attached.

This message was sent by Atlassian JIRA

View raw message