Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Apache Ignite needs to support cache rebalancing as transferring partition files using zero copy algorithm based algorithm [1] based on an extension of communication SPI and Java NIO API.

...

To benefit from zero file copy we must delegate the file transferring to FileChannel#transferTo(long, long, java.nio.channels.WritableByteChannel) [2] because the fast path of transferTo method is only executed if the destination buffer inherits from an internal JDK class.

...

The cache partition file transfer over the network must be done using file chunks with validation of received piece of data on the demander side.

  • The new layer over the cache partition file must support direct using of FileChannel#transferTo method over the CommunicationSpi pipe connection;
  • The process manager must support transferring the cache patition partition file by chunks of predefined size (multiply to the page size) one by one;
  • The connection bandwidth of the cache partition file transfer must have an ability to be limited at runtime;

Checkpoint on demand

...

Checkpointing on supplier

When the supplier node receives the cache partition file demand request it must prepare and provide the cache partition file to transfer over network. The Copy-on-Write [3] tehniques assume to be used to guarantee the data consistency during chunk transfer.  

The checkpointing process description on the supplier node:

  1. The node starts and waits for the checkpoint process to be finished;
  2. The node creates empty temporary cache partition file with .tmp postfix in the same cache persistence directory;
  3. The whole cache partition file divided into virtual rebalance chunks of predefined size (multiply to the PageMemory size);
  4. The checkpoint thread determines the appropriate rebalance file chunk and tries to flush dirty page to the cache partition file
    1. If rebalance chunk already transferred than just flush the dirty page to the file;
    2. If rebalance chunk not transferred
      1. Write this chunk to the temporary cache partition file;
      2. Flush the dirty page;

Record temp-WAL and recovery


Risks and Assumptions

A few notes can be mentioned:

...

// Links to discussions on the devlist, if applicable.

Reference Links

  1. Zero Copy I: User-Mode Perspective – https://www.linuxjournal.com/article/6345
  2. Example: Efficient data transfer through zero copy – https://www.ibm.com/

...

  1. developerworks/library/j-zerocopy/index.html
  2. Copy-on-write – https://en.wikipedia.org/wiki/Copy-on-write

Tickets

// Links or report with relevant JIRA tickets.