ceph-mirror/debian/libradospp-dev.install
Alex Ainscow 8a2793fa73 librados: enforce compile-time read/write semantics for class methods
Status Quo:
Librados currently uses string-based identifiers for RADOS class method calls
(exec) in both ObjectReadOperation and ObjectWriteOperation. The API does
not distinguish between methods that modify object state and those that
are read-only.

Problem:
This lack of semantic enforcement has become a critical safety gap with the
introduction of EC Direct Reads. Because the EC direct read path is optimized
for performance, it may process the same read-only operation multiple times
(e.g., across different shards or during retries).

Previously, while technically a violation of API semantics, a "read-that-writes"
would often function correctly because operations were processed in-order and
without retries on the read path. However, in the context of EC direct reads,
executing a non-idempotent write through the read path poses a silent and
critical risk to data integrity.

Solution:
Introduce a template-based trait system to encode method semantics into the
API. By tagging methods with traits (MethodRead or MethodWrite), the compiler
now prevents state-modifying methods from being added to ObjectReadOperation.
This ensures that only side-effect-free methods reach the EC direct read
path, eliminating the risk of accidental double-writes at the source.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
2026-04-13 10:38:24 +01:00

11 lines
309 B
Plaintext

usr/include/rados/buffer.h
usr/include/rados/buffer_fwd.h
usr/include/rados/crc32c.h
usr/include/rados/inline_memory.h
usr/include/rados/librados.hpp
usr/include/rados/librados_fwd.hpp
usr/include/rados/page.h
usr/include/rados/rados_types.hpp
usr/include/rados/cls_flags.hpp
usr/include/rados/cls_traits.hpp