POBJ_ROOT_TYPE_NUM changes

29 views
Skip to first unread message

Simon Smart

unread,
Mar 23, 2016, 12:32:05 PM3/23/16
to pmem, piotr....@intel.com
Hi

On pulling recent changes to the library, I couldn't help notice that the value of POBJ_ROOT_TYPE_NUM has been changed.

It was previously 65535 (UINT16_MAX). In commit cafc9480 it was changed to 65000, and then again 12 days later to zero in commit f6ade13.

Firstly, the choice of UINT16_MAX seems sufficiently specific that it was presumably chosen for a reason. What was the rationale for setting it to zero.

Secondly, is this value stored anywhere within the pool files, or is only attached at the time that ::pmemobj_root() is called? (specifically, is this change going to cause backward-compatibility errors with existing pools)?

Many thanks

Simon Smart
European Centre for Medium Range Weather Forecasts

Piotr Balcer

unread,
Mar 24, 2016, 5:00:03 AM3/24/16
to pmem, piotr....@intel.com
Hi Simon,
In the preparation for the upcoming 1.0 release of our library we recently
made a significant breaking change to both our API and the pool layout.
Informations about that are in this pull request:
https://github.com/pmem/nvml/pull/671

The root object type number is specific because it's manully configurable
and the rationale behind the POBJ_ROOT_TYPE_NUM is to ensure that the
programmer knows what's the return value of pmemobj_type_num() function
when called on the root object. And yes, this value is stored in the pool
file in the root object's header - you can check this information with
the pmempool cli we provide.

This specific change does NOT break backward-compatiblity with existing
pools.

Because our library hasn't reached a stable release yet (we are close), we
weren't too concerned with breaking pmemobj pool backward-compatiblity. In
the same pull request as the root object type number change, the pool
layout changed significantly.

If you are already running old versions of libpmemobj in production,
please let us know so that we can help you transition to more recent
versions (we are not planning any further changes to the layout).

After 1.0 release our memory layout is going to be rock solid :)

Piotrek
Reply all
Reply to author
Forward
0 new messages