The history is coming from an MOSDPGNotify, but that is covered
by a require_same_or_newer_map check, so we're all good.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Previously, the PGs were created with a creation date of the current
OSDMap. However, under some circumstances the PG creation can occur
under a later OSDMap epoch. This could lead to client requests that
were sent under epoch n, while the OSD insisted that the PG was
created in epoch n+1 so the client request was invalid. Since the
OSD expects the client to resubmit requests in such circumstances,
and the client thought all was well, this led to hanging client
requests.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Implement a new subclass of Formatter, RGWFormatter_Plain, using code
from the old RGWFormatter and RGWFormatter_Plain classes.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
This used to be safe by virtue of assigning same_acting_since
to osdmap->get_epoch(), but since we fixed bugs by handling
that better we now need to update the last_epoch_started
initialization.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
These are always the current sets; I don't know why they would
ever be called lastup and it confused me when I started looking
at this. Confusion means something needs to change!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
* rename RgwFormatter::init to RgwForamtter::reset.
Roll old reset() into base_reset().
* add write_raw_data to Formatter, to support DTDs.
Remove other DTD support code.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
We were getting heartbeats from just acting replicas. That's really not
enough if we want to be sure to detect failures of OSDs we depend on,
which includes any stray or up OSDs as well.
Signed-off-by: Sage Weil <sage@newdream.net>
Primary sends explicit message to replicas asking for heartbeats to start,
or to stop. Replicas never send heartbeats unless explicitly requested
to.
Do not try to mark down old heartbeat relationships; that gets messy, and
the overhead of open sockets is too small to worry about right now.
Signed-off-by: Sage Weil <sage@newdream.net>
We want to carefully set up the PG History. In most cases this will
do the same thing as previously, since it's a brand new PG. However,
it's possible for the monitor to send out MOSDPGCreate messages for
the same PG to more than one OSD over many epochs if the OSDs are down
or are slow to respond. In that case we need to carefully track
history to make sure we don't lose old data.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Previously we were initializing based on the local osdmap epoch, which
is often correct, but if we process the MOSDPGCreate in an epoch after
the PG was created in the OSDMap, we could have problems with clients
sending out messages based on the creation epoch which the OSD would
reject as being earlier than same_primary_since. See bug #1357.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Every time I see "ondisk = 0" I think it means that the message
is an ack, not a commit. Now I won't, and neither will anybody else!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Not sure why this wasn't there before...looks like the CRUSH option
is newer than the code and it didn't all get updated.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Allow a string category to be set on object creation. Object stats will
be included in the category total (in addition to the overall total).
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>