[
https://issues.apache.org/jira/browse/IGNITE-10563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16710536#comment-16710536
]
Stanislav Lukyanov commented on IGNITE-10563:
---------------------------------------------
fsync-on-demand seems to be easy to implement. The main question is the API.
The operation would be node-wide (since we have one WAL per node), and the only
interface with operations for a node is Ignite. However, this operation seems
to be too low-level and rare to place it in the main Ignite interface.
> Allow manual fsync for WAL
> --------------------------
>
> Key: IGNITE-10563
> URL: https://issues.apache.org/jira/browse/IGNITE-10563
> Project: Ignite
> Issue Type: Improvement
> Reporter: Stanislav Lukyanov
> Priority: Major
>
> When walMode is set to LOG_ONLY or BACKGROUND there is a gap between
> successful return of cache write operations and actual of the data to the
> persistent memory. This gap is, while usually low, generally can be of any
> length and depends on low-level system parameters (e.g. sysctl memory and IO
> settings on Linux).
> On the other hand, there are situations when a user may want to ensure that
> at certain points all writes have been propagated to the disk.
> For example, say a large batch of data is being inserted into Ignite from an
> upstream system. After finishing the batch we want to ensure that all of the
> data is secure, and after that we remove the batch from the upstream storage.
> In other words, we want
> {code}
> map = upstream.getData();
> cache.putAll(map);
> cache.fsync(); // <-------
> upstream.removeAll(map);
> {code}
> Currently there is no easy way to ensure that certain write (or all writes
> until a point in time) has been flushed to a device. We can only rely on
> settings like WAL sync interval, checkpoint timeout, etc.
> It would be nice to have a way to manually call fsync() for WAL to have a
> strong guarantee that all previous updates have been fully written on disk.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)