Previously, a client requesting a large pgls could tie up the
osd for an unacceptable amount of time. Also, it's possible
for the osd to return less than the requested number of
entries anyway, so we now return 1 when we have completed the
listing.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
First problem: if the osd returns more entries than we ask for, max_entries
was going negative, and we were requesting (u64)(-small number) on the
next iteration, slamming the OSD when the PG was big. We fix that by
finishing response_size >= max_entries.
Second problem: AFAICS we were not requesting the second chunk on a large
PG at all, here, if the OSD returned less than what we wanted. Fix this
by asking for more in that case.
That means we detect the end of a PG in two ways:
* if the OSD sets the return value to 1 (instead of 0)
* if we get 0 items in the response
Another patch will change the OSD behavior to return 1, and all will be
well. If we run against an old OSD, we'll send an extra request for each
PG and get nothing back before we realize we've hit the end and move on.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
It is possible for the latest version to get out in front of the
last_committed version:
a- start slurping
a- slurp a bunch of states, through X
a- get them back, write them out
b- monitor commits many new states
a- slurp latest, X+100 say, but only get some of those states due to the
slurp per-message byte limit
a- write latest + some (but not all) prior states
a- call back into slurp(), update_from_paxos(), trigger assert
This fix ensures that we make note of the source's new latest, so that on
the next pass through slurp() we will grab any missing states.
We *also* explicitly require that we get everything up through what we have
stashed, in defense against some future kludging that might only require we
nearly (but not completely) in sync before finishing the slurp.
Fixes: #2379
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
omap_bench writes configurable objectmaps to a configurable number
of objects and generates latency statistics.
Signed-off-by: Eleanor Cawthon <eleanor.cawthon@inktank.com>
Limit the amount of memory that can be consumed by client messages, similar
to the OSD. Do not limit inter-mon messages.
Fixes: #2495
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
bufferlist allocates page-sized chunks and avoids realloc, which'll be
more efficient than vector resize doubling just about always.
Signed-off-by: Sage Weil <sage@inktank.com>
If an unwatch crosses paths with a notify, we currently force the notifier
to keep waiting. Instead, implicitly ack any notify when we unwatch.
Fixes: #2491
Signed-off-by: Sage Weil <sage@inktank.com>
This avoids making the callback parse off the command portion on their own.
It also lets them assert that the command portion is in the set of
registered commands.
Signed-off-by: Sage Weil <sage@inktank.com>
Allow any command prefix to be registered, provided it is separated by a
space. Previously, we always matched against the first word.
Signed-off-by: Sage Weil <sage@inktank.com>
This fixes#2487. When writing bucket info we just
wrote the object content, and were overriding any
attrs that object contained (that is -- corrupted
the ACLs).
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
In case the policy attr on object/bucket is broken
return a default policy, in which the owner is set
as the bucket owner.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This lets you do something like
p g_ceph_context->_conf->subsys.set_log_level(ceph_subsys_mon, 20)
from gdb.
Signed-off-by: Sage Weil <sage@newdream.net>
The sense of this check was wrong from the get-go, back in a5d99add. Fix
it. This may be silencing a lot of misdirected op noise!
Signed-off-by: Sage Weil <sage@inktank.com>