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

Ariel Weisberg commented on CASSANDRA-10592:
--------------------------------------------

Huh, so actually it's mostly taken care of. {{DataOutputBuffer.flush()}} throws 
UnsupportedOperationException and {{DataOutputBuffer.close()}} is overridden 
and does nothing.

I added the check to {{reallocate(long)}} for <= 0, but I can't find a way to 
test it short of subclassing and calling it directly. It's tempting to let it 
reallocate anyways because there are two potential bugs here. One bug is 
reallocating when we didn't need to and the application continues to run fine. 
The other bug is that it doesn't reallocate when it needs to and is stuck in an 
infinite loop.

I am comfortable with either. Let me know what you want.

> IllegalArgumentException in DataOutputBuffer.reallocate
> -------------------------------------------------------
>
>                 Key: CASSANDRA-10592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Compaction, Local Write-Read Paths, Streaming and 
> Messaging
>            Reporter: Sebastian Estevez
>            Assignee: Ariel Weisberg
>             Fix For: 3.0.1, 3.1, 2.2.x
>
>
> CORRECTION-
> It turns out the exception occurs when running a read using a thrift jdbc 
> driver. Once you have loaded the data with stress below, run 
> SELECT * FROM "autogeneratedtest"."transaction_by_retailer" using this tool - 
> http://www.aquafold.com/aquadatastudio_downloads.html
>  
> The exception:
> {code}
> WARN  [SharedPool-Worker-1] 2015-10-22 12:58:20,792 
> AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread 
> Thread[SharedPool-Worker-1,5,main]: {}
> java.lang.RuntimeException: java.lang.IllegalArgumentException
>       at 
> org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2366)
>  ~[main/:na]
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
> ~[na:1.8.0_60]
>       at 
> org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164)
>  ~[main/:na]
>       at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) 
> [main/:na]
>       at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
> Caused by: java.lang.IllegalArgumentException: null
>       at java.nio.ByteBuffer.allocate(ByteBuffer.java:334) ~[na:1.8.0_60]
>       at 
> org.apache.cassandra.io.util.DataOutputBuffer.reallocate(DataOutputBuffer.java:63)
>  ~[main/:na]
>       at 
> org.apache.cassandra.io.util.DataOutputBuffer.doFlush(DataOutputBuffer.java:57)
>  ~[main/:na]
>       at 
> org.apache.cassandra.io.util.BufferedDataOutputStreamPlus.write(BufferedDataOutputStreamPlus.java:132)
>  ~[main/:na]
>       at 
> org.apache.cassandra.io.util.BufferedDataOutputStreamPlus.write(BufferedDataOutputStreamPlus.java:151)
>  ~[main/:na]
>       at 
> org.apache.cassandra.utils.ByteBufferUtil.writeWithVIntLength(ByteBufferUtil.java:296)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.marshal.AbstractType.writeValue(AbstractType.java:374)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.rows.BufferCell$Serializer.serialize(BufferCell.java:263)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.rows.UnfilteredSerializer.serialize(UnfilteredSerializer.java:183)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.rows.UnfilteredSerializer.serialize(UnfilteredSerializer.java:108)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.rows.UnfilteredSerializer.serialize(UnfilteredSerializer.java:96)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer.serialize(UnfilteredRowIteratorSerializer.java:132)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer.serialize(UnfilteredRowIteratorSerializer.java:87)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer.serialize(UnfilteredRowIteratorSerializer.java:77)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:381)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:136)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:128)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:123)
>  ~[main/:na]
>       at 
> org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:65) 
> ~[main/:na]
>       at 
> org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:289) 
> ~[main/:na]
>       at 
> org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1697)
>  ~[main/:na]
>       at 
> org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2362)
>  ~[main/:na]
>       ... 4 common frames omitted
> {code}
> I was running this command:
> {code}
>     tools/bin/cassandra-stress user 
> profile=~/Desktop/startup/stress/stress.yaml n=100000 ops\(insert=1\) -rate 
> threads=30
> {code}
> Here's the stress.yaml UPDATED!
> {code}
> ### DML ### THIS IS UNDER CONSTRUCTION!!!
> # Keyspace Name
> keyspace: autogeneratedtest
> # The CQL for creating a keyspace (optional if it already exists)
> keyspace_definition: |
>   CREATE KEYSPACE autogeneratedtest WITH replication = {'class': 
> 'SimpleStrategy', 'replication_factor': 1};
> # Table name
> table: test
> # The CQL for creating a table you wish to stress (optional if it already 
> exists)
> table_definition:
>   CREATE TABLE test (
>   a int,
>   b int,
>   c int,
>   d int,
>   e int,
>   f timestamp,
>   g text,
>   h bigint,
>   i text,
>   j text,
>   k bigint,
>   l text,
>   m text,
>   n float,
>   o int,
>   p float,
>   q float,
>   r text,
>   s float,
>   PRIMARY KEY ((a, c, d, b, e), m, f, g)
>   );
> ### Column Distribution Specifications ###
> columnspec:
>   - name: a
>     size: uniform(4..4)
>     population: uniform(1..500)
>   - name: b
>     size: uniform(4..4)
>     population: uniform(2..3000)
>   - name: c
>     size: uniform(4..4)
>     population: uniform(1..100)
>   - name: d
>     size: uniform(4..4)
>     population: uniform(1..120)
>   - name: e
>     size: uniform(4..4)
>     population: uniform(1..100)
>   - name: f
>     size: fixed(4)
>     population: fixed(1)
>     cluster: fixed(100)
>   - name: g
>     size: fixed(40)
>     population: fixed(1)
>     cluster: fixed(10)
>   - name: h
>     size: fixed(4)
>     population: fixed(1)
>   - name: i
>     size: fixed(400000)
>     population: fixed(10)
>   - name: j
>     size: uniform(40..40)
>     population: fixed(1)
>   - name: k
>     size: fixed(8)
>     population: fixed(1)
>   - name: l
>     size: fixed(1)
>     population: fixed(1)
>   - name: m
>     size: uniform(40..40)
>     population: uniform(1..2000)
>   - name: n
>     size: gaussian(4..4)
>     population: gaussian(1..100)
>   - name: o
>     size: fixed(4)
>     population: fixed(1)
>   - name: p
>     size: gaussian(8..8)
>     population: gaussian(1..100)
>   - name: q
>     size: gaussian(8..8)
>     population: gaussian(1..10000)
>   - name: r
>     size: fixed(40)
>     population: fixed(2)
>   - name: s
>     size: gaussian(8..8)
>     population: gaussian(1..200000)
> ### Batch Ratio Distribution Specifications ###
> insert:
>   partitions: fixed(1)            # Our partition key is the domain so only 
> insert one per batch
>   select:  fixed(1)/1000        # We have 1000 posts per domain so 1/1000 
> will allow 1 post per batch
>   batchtype: UNLOGGED             # Unlogged batches
> #
> # A list of queries you wish to run against the schema
> #
> queries:
>    likelyquery0:
>     cql: Select * from test where a = ? and c = ? and d = ? and b = ? and e = 
> ?
>     fields: samerow
>    likelyquery1:
>     cql: Select * from test where a = ? and c = ? and d = ? and b = ? and e = 
> ? and m = ?
>     fields: samerow
>    likelyquery2:
>     cql: Select * from test where a = ? and c = ? and d = ? and b = ? and e = 
> ? and m = ? and f = ?
>     fields: samerow
>    likelyquery3:
>     cql: Select * from test where a = ? and c = ? and d = ? and b = ? and e = 
> ? and m = ? and f = ? and g = ?
>     fields: samerow
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to