You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Paul Prescod <pr...@gmail.com> on 2010/04/07 18:02:40 UTC

ConsistencyLevel.ZERO

On Tue, Apr 6, 2010 at 10:58 AM, Tatu Saloranta <ts...@gmail.com> wrote:
> On Tue, Apr 6, 2010 at 8:17 AM, Jonathan Ellis <jb...@gmail.com> wrote:
>> On Tue, Apr 6, 2010 at 2:13 AM, Ilya Maykov <iv...@gmail.com> wrote:
>>> That does sound similar. It's possible that the difference I'm seeing
>>> between ConsistencyLevel.ZERO and ConsistencyLevel.ALL is simply due
>>> to the fact that using ALL slows down the writers enough that the GC
>>> can keep up.
>>
>> No, it's mostly due to ZERO meaning "buffer this locally and write it
>> when it's convenient," and buffering takes memory.  If you check your
>> tpstats you will see the pending ops through the roof on the node
>> handling the thrift connections.
>
> This sounds like a great FAQ entry? (apologies if it's already included)
> So that ideally users would only use this setting if they (think they)
> know what they are doing. :-)

I added this note to the API docs:

 * ConsistencyLevel.ZERO: Ensure nothing. A write happens
asynchronously in background. If too many of these queue up, buffers
will explode and bad things will happen.

Apologies if I violated any community conventions. I'm happy to fix
the text if someone has a better suggestion.

 Paul Prescod

Re: ConsistencyLevel.ZERO

Posted by Paul Prescod <pa...@prescod.net>.
Is it planned that Cassandra will eventually be able to handle a
buffer overflow without crashing?

Is this related to "Cassandra-685 - Add backpressure to StorageProxy"

"Now that we have CASSANDRA-401 and CASSANDRA-488 there is one last
piece: we need to stop the target node from pulling mutations out of
MessagingService as fast as it can only to take up space in the
mutation queue and eventually fill up memory."

Or is it "MessagingService" itself which is OOMing?

On Wed, Apr 7, 2010 at 9:06 AM, Jonathan Ellis <jb...@gmail.com> wrote:
> Great!
>
> On Wed, Apr 7, 2010 at 11:02 AM, Paul Prescod <pr...@gmail.com> wrote:
>> On Tue, Apr 6, 2010 at 10:58 AM, Tatu Saloranta <ts...@gmail.com> wrote:
>>> On Tue, Apr 6, 2010 at 8:17 AM, Jonathan Ellis <jb...@gmail.com> wrote:
>>>> On Tue, Apr 6, 2010 at 2:13 AM, Ilya Maykov <iv...@gmail.com> wrote:
>>>>> That does sound similar. It's possible that the difference I'm seeing
>>>>> between ConsistencyLevel.ZERO and ConsistencyLevel.ALL is simply due
>>>>> to the fact that using ALL slows down the writers enough that the GC
>>>>> can keep up.
>>>>
>>>> No, it's mostly due to ZERO meaning "buffer this locally and write it
>>>> when it's convenient," and buffering takes memory.  If you check your
>>>> tpstats you will see the pending ops through the roof on the node
>>>> handling the thrift connections.
>>>
>>> This sounds like a great FAQ entry? (apologies if it's already included)
>>> So that ideally users would only use this setting if they (think they)
>>> know what they are doing. :-)
>>
>> I added this note to the API docs:
>>
>>  * ConsistencyLevel.ZERO: Ensure nothing. A write happens
>> asynchronously in background. If too many of these queue up, buffers
>> will explode and bad things will happen.
>>
>> Apologies if I violated any community conventions. I'm happy to fix
>> the text if someone has a better suggestion.
>>
>>  Paul Prescod
>>
>

Re: ConsistencyLevel.ZERO

Posted by Jonathan Ellis <jb...@gmail.com>.
Great!

On Wed, Apr 7, 2010 at 11:02 AM, Paul Prescod <pr...@gmail.com> wrote:
> On Tue, Apr 6, 2010 at 10:58 AM, Tatu Saloranta <ts...@gmail.com> wrote:
>> On Tue, Apr 6, 2010 at 8:17 AM, Jonathan Ellis <jb...@gmail.com> wrote:
>>> On Tue, Apr 6, 2010 at 2:13 AM, Ilya Maykov <iv...@gmail.com> wrote:
>>>> That does sound similar. It's possible that the difference I'm seeing
>>>> between ConsistencyLevel.ZERO and ConsistencyLevel.ALL is simply due
>>>> to the fact that using ALL slows down the writers enough that the GC
>>>> can keep up.
>>>
>>> No, it's mostly due to ZERO meaning "buffer this locally and write it
>>> when it's convenient," and buffering takes memory.  If you check your
>>> tpstats you will see the pending ops through the roof on the node
>>> handling the thrift connections.
>>
>> This sounds like a great FAQ entry? (apologies if it's already included)
>> So that ideally users would only use this setting if they (think they)
>> know what they are doing. :-)
>
> I added this note to the API docs:
>
>  * ConsistencyLevel.ZERO: Ensure nothing. A write happens
> asynchronously in background. If too many of these queue up, buffers
> will explode and bad things will happen.
>
> Apologies if I violated any community conventions. I'm happy to fix
> the text if someone has a better suggestion.
>
>  Paul Prescod
>