You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Ricky Nauvaldy Ruliputra <ri...@sci.ui.ac.id> on 2017/05/02 07:27:22 UTC

Write-behind Flush Size

Hello,
Currently, I'm trying to do a write-behind caching depending on the flush
size (I set the writeBehindFlushSize to a number, and set the
writeBehindFlushFrequency to 0). I read the documentation [1], and it said
that the default writeBehindFlushSize is 10240. What is this number
actually? Is it in bytes? When will the cache actually be flushed? My data
is the same as the one in [2]. I tried to put some inputs, and nothing
happened. But when I stop the node by calling /Ignite.stop(true)/, the data
in the cache is written to the store. Did I miss something? 

FYI I already suceeded the write behind using writeBehindFlushFrequency, but
this is another case. I also want to use write behind using
writeBehindFlushSize so I might use it in another case. Do I only need to
change the writeBehindFlushFrequency and writeBehindFlushSize from the
previous case?

Thanks for any help that you can provide.

[1] https://apacheignite.readme.io/docs/persistent-store
[2]
http://apache-ignite-users.70518.x6.nabble.com/How-to-do-write-behind-caching-td12138.html



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Write-behind-Flush-Size-tp12336.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Write-behind Flush Size

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi Ricky,

WriteBehindFlushSize is number of entries that queue can accumulate before
it will be flushed.

Are you update a entry with same key or different entries?
Entry in writeBehind queue can be overwritten before it will be persisted.

You can use time-based flushing or queue-sized flushing or both together.

On Wed, May 3, 2017 at 6:40 AM, rickynauvaldy <ri...@sci.ui.ac.id>
wrote:

> It turns out that the flush process is executed when there are "n+1" rows
> that change. If I set writeBehindFlushSize = 2, then the writing process
> will be executed on the third change in the table because "with the
> write-behind approach, only the last update to an entry will be written to
> the underlying storage" [1].
>
> I hope that I get it right.
> Thanks.
>
> [1]
> https://apacheignite.readme.io/docs/persistent-store#
> section-write-behind-caching
>
>
>
> -----
> -- Ricky
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Write-behind-Flush-Size-tp12336p12367.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Best regards,
Andrey V. Mashenkov

Re: Write-behind Flush Size

Posted by rickynauvaldy <ri...@sci.ui.ac.id>.
It turns out that the flush process is executed when there are "n+1" rows
that change. If I set writeBehindFlushSize = 2, then the writing process
will be executed on the third change in the table because "with the
write-behind approach, only the last update to an entry will be written to
the underlying storage" [1].

I hope that I get it right.
Thanks.

[1]
https://apacheignite.readme.io/docs/persistent-store#section-write-behind-caching



-----
-- Ricky
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Write-behind-Flush-Size-tp12336p12367.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.