New object class selection API


Chaarawi, Mohamad
 

Hi All,

 

I would like to highlight a new API we added in 1.2 in regards to object class selection when generating OIDs for objects:

https://github.com/daos-stack/daos/blob/master/src/include/daos_obj.h#L404

 

We understand that our object class list is extremely long and not very intuitive for users. So we made an effort to try and select the best object class ourselves based on few things:

  • Container properties – for now the redundancy factor is taken into consideration here. So if you choose RF=1 when creating the container, the auto class generation will make sure to select an oclass that supports a RF factor of 1 (2-way replication for example)
  • The object type – based on the feature flag (flat KV, array, or generic). For example for arrays we choose an EC based class if redundancy is required, but for KV objects we choose replication.
  • Hints from user (redundancy level (auto – cont property, no redundancy, replication, EC) and sharding level (default, tiny, regular, .. max):

 

Of course the option for users to select the object class themselves is still supported with the API, and the auto oclass selection is triggered only when the provided oclass is unkown / 0.

 

Please note that the old API is deprecated:

https://github.com/daos-stack/daos/blob/master/src/include/daos_obj.h#L328

and I would like to invite everyone working on middleware on top of DAOS to change to using the new API.

DFS (POSIX) has already been migrated but that change did not make it into 1.2 series, but is already in master.

 

Please let us know if you have questions or need clarifications on this new API.

 

Thanks,

Mohamad