Write handling for WORM object
All data are stored as regular(hierarchical) objects initially, because it is very challenging to handle write in flattened format (MVCC, ilog, DTX…). In addition, even for WORM object, application can still submit writes in multiple RPCs, e.g., appends, in this case, it is complex to add new keys and values to flattened buffer. To avoid these complexities, this design does not change the write handler, which creates trees to index keys and values for write request.
Flatten immutable WORM object
DAOS can provide API to allow user to indicate write completion of WORM objects:
...
The flattening service only serializes objects with small number of keys and values, because flattened format only supports leaner search which is inefficient if there are too many keys and values. It means that even for WORM object, if it has a lot of keys and values then it stays in hierarchical format to support efficient read.
Because DAOS only flattens small objects, so it should be able to store multiple flattened objects in the same SSD extent to avoid fragmentation and reduce write amplification.
Read handling for flattened WORM object
DAOS will have a new read handler for flattened object, it can find the requested key and value from the flattened object format by leaner search. Because flattened object is stored in DT-blob and it can be evicted from DRAM. If storage engine receives a read request against an evicted object, it can bring the entire object back to DRAM by one SSD read.Because DAOS only flattens small objects, so it should be able to store multiple flattened objects in the same SSD extent to avoid fragmentation and reduce write emplifcation.