There was no version encoding previously, so this is an incompatible
change. Fortunately this type is only used in one place, MOSDPGCreate,
so we'll rev that encoding and compensate there. All is well!
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Track the time when the pg state last changed (or was refreshed) in
interesting ways.
Also track the epoch when the mapping last changed (same_interval_since).
Signed-off-by: Sage Weil <sage@newdream.net>
We can have a sequence like:
- commit_start, blocked=true
- op_start thread A gets in line
- op_start thread B gets in line
- commit finished, blocked=false
- thread A goes
- op_start thread C sees blocked=false and continues
-> order broken
If there are people in line from a previous block, we need to get in line,
even if blocked == false.
Signed-off-by: Sage Weil <sage@newdream.net>
When I added the ordering constraint fix back in 259c509a I got the
check backwards. We want to wait if we are blocked OR we are not in the
front of the line (i.e., proceed if we are not blocked AND first in line).
Fixes: #2046
Signed-off-by: Sage Weil <sage@newdream.net>
Counting them as ops but not requeueing the pg for recovery causes
backfill to stall when only deletions are sent in
recover_backfill(). Deletions are cheap and don't need to be acked, so
we can simply stop counting them as ops.
Fixes: #2044
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
The pg has already been dequeued at the beginning of do_recovery(),
and it requeues itself only if it starts a new recovery op.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Any special character encoding should be done through %hex. The
plus sign is a valid character in object names, and in user id
(when used in signed urls).
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
If the pg mapping changes away from us, we can safely discard messages we
have waiting for the PG to be created.
Fixes: #2013
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
PG::activate() can make lots of changes, most notably clean_up_local()
which deletes lots of local objects. Those changes need to be flushed
to the fs before we start servicing requests or else we risk processing a
client read on those objects.
Fixes: #1974
Signed-off-by: Sage Weil <sage@newdream.net>