Just before sending an op, prepare_mutate_op() is called, creating a
new Op. prepare_read_op() already copied over all the out-params
correctly, but for write operations the individual op return value
pointers were not copied, so they would not be filled in. With this
fixed, librados users can get the per-op return codes again.
Partially fixes: #6483
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Prior to EC pools, unfound => missing. Now, unfound (unreadable,
really) is dependent on the PGBackend requirements for reconstituting
an object. This also means recovering an object missing on a replica
but not the primary requires tracking the missing_loc set.
Thus, rather than maintaining missing_loc only for objects missing
on the primary, the MissingLoc structure will track all missing
objects actingbackfill-wide until each object is recovered.
For simplicity, since we don't really know what objects need recovery
until activation (and since we can't do anything with that information
prior to activation anyway), we defer populating the missing_loc
information until activation.
We need peers to rollback divergent log entries before we attempt to
read the relevant objects. The simplest way to accomplish this seems to
be the simply choose to always activate peers if search_for_missing
turns up missing objects.
Due to EC pools, missing is necessary, but not sufficient for readability.
Thus, we instead check is_unreadable for cases where we need to read the object
and reserve is_missing for cases where we need the object context.
wait_for_missing_object becomes waiting_for_unreadable_object in order to avoid
having another layer of waiting_for_* maps. These ops may be requeued
either when the primary is recovered or when the object is no longer degraded,
depending on when the object becomes readable.
Signed-off-by: Samuel Just <sam.just@inktank.com>
ECBackend needs to be able to require that a readable
set of the most recent interval to write be available
in order to ensure that it rolls back the log far
enough.
Signed-off-by: Samuel Just <sam.just@inktank.com>
ECBackend's primary specific logic mostly won't treat the
primary shard specially, so it'll be handy to have primary
agnostic helpers for get_shard_info and get_shard_missing.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Otherwise, we cannot correctly determine up_from/up_thru for
old intervals. Also, we need this information to determine
when a new interval starts due to a new primary without a
change in the acting set.
Signed-off-by: Samuel Just <sam.just@inktank.com>
We may have multiple pg shards on the same osd for an
ec pool. Thus, replicas must be referred to by <osd, shard>
and pgs by <pgid, shard>.
Signed-off-by: Samuel Just <sam.just@inktank.com>
We can no longer use the messenger source information to determine
the origin of the message since an osd might have more than one
shard of a particular pg. Thus, we need to include a pg_shard_t
from field to indicate origin. Similarly, pg_t is no longer
sufficient to specify the destination pg, we instead use spg_t.
In the event that we get a message from an old peer, we default
from to pg_shard_t(get_source().num(), ghobject_t::no_shard())
and spg_t to spg_t(pgid, ghobject_t::no_shard()). This suffices
because non-NO_SHARD shards can only appear once ec pools have
been enabled -- and doing that bans unenlightened osds.
Signed-off-by: Samuel Just <sam.just@inktank.com>