Motr  M0
IO FOL DLD

Overview

This document describes the design of logging of FOL records for create, delete and write operations in ioservice.


Definitions


Requirements


Dependencies

For every new write data must be written to new block. So that these older data blocks can be used to perform write undo.


Design Highlights

For each update made on server corresponding FOL record fragment is populated and added in the FOM transaction FOL record fragments list.

These FOL record fragments are encoded in a single FOL record in a FOM generic phase after updates are executed.


Functional Specification

See also
ad_rec_frag is added for AD write operation.

For each of create, delete and write IO operations FOL record fragments are added in FOM generic phase M0_FOPH_FOL_FRAG_ADD using m0_fop_fol_add().

For create and delete operations fop data and reply fop data is stored in FOL record fragments.

  • fop data including fid.
  • Reply fop data is added in FOL records so that it can be used as Reply Cache.

For write operation, in ad_write_launch() store AD allocated extents in FOL record fragment struct ad_rec_frag.

All these FOL record fragments are to the list in the transaction record.


Unit Tests

1) For create and delete updates, An io fop with a given fid is send to the ioservice, where it creates a cob with that fid and logs a FOL record.

Now retrieve that FOL record using the same LSN and assert for fid and reply fop data.

Also using this data, execute the cob delete operation on server side (undo operation).

Similarly, do the same things for delete operation.

2) For Write update, Send the data having value "A" from client to ioservice which logs fid and data extents in FOL record. Then send the data having value "B" to the ioservice.

Now retrieve the data extents of the first write operation from FOL record and update the AD table by decoding ad_rec_frag from FOL record. Then read the data from ioservice and assert for data "A".


System Tests


Analysis

For documentation links, please refer to this file : doc/motr-design-doc-list.rst