This will be used by PGBackend implementers to get the SnapSet
and ObjectInfo for newly recovered objects on the primary.
get_object_context may be called on a missing object for a lost_revert
Signed-off-by: Samuel Just <sam.just@inktank.com>
The leader mon is responsible for propagating changes in the osdmap
into the pgmap (e.g., when a pool or osd goes away). If that hasn't
happened yet, the pg_map map will be out of sync with the current set
of pools. We shouldn't crash.
Signed-off-by: Sage Weil <sage@inktank.com>
src/Makefile-env.am:31: error: using '$(srcdir)' in TESTS is currently broken: '$(srcdir)/unittest_bufferlist.sh'
src/Makefile.am:1: 'src/Makefile-env.am' included from here
src/Makefile-env.am:31: error: using '$(srcdir)' in TESTS is currently broken: '$(srcdir)/test/encoding/check-generated.sh'
src/Makefile.am:1: 'src/Makefile-env.am' included from here
on my (raring) laptop.
Signed-off-by: Sage Weil <sage@inktank.com>
The substr_of bufferlist method is used to reduce the copies to the
strict minimum. It is both able to split bufferptr when they are larger
than a chunk and to concatenate them when they are smaller.
Signed-off-by: Loic Dachary <loic@dachary.org>
It is not required and a leftover of the time when it was a unit test
which was a mistake to begin with. It has been reported to create
dependencies problems in some cases, when gest is not available at the
time get_command_descriptions is compiled.
Signed-off-by: Loic Dachary <loic@dachary.org>
Map duplicate mails / names in commit logs to a single canonical names.
Useful to report to management with git shortlog -nes
Signed-off-by: Loic Dachary <loic@dachary.org>
The adjust method returns a count of adjusted items.
Add a test.
Fixes: #6382
Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Not LP64, which includes ppc64 and clearly does not build.
Fixes: #6283
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
The TEST_F(ErasureCodePluginRegistryTest, factory_mutex) was bugous and
only succeeded by chance. The sleep was on the factory constructor which
was never called. An erasure code plugin that hangs forever on load is
created instead.
The sleep_forever.detach is replaced by pthread_cancel to interrupt the
thread that hangs forever. If not, gtest will try to join the thread and
never exit.
Signed-off-by: Loic Dachary <loic@dachary.org>
otherwise src/test/cli/radosgw-admin/help.t fails when running make
check when run after a configure --with-radosgw
Signed-off-by: Loic Dachary <loic@dachary.org>
We need to wrap the full decode section or we can abort the process
if there's an issue (which we may want to just skip by).
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Andreas-Joachim Peters pointed out that the ErasureCodeJerasure method
pad_in_length is very inefficient for no reason. It is replaced by the
alignment method and the calculation is inlined in the encode method.
Signed-off-by: Loic Dachary <loic@dachary.org>
If there is a pool that has a high objects/pg relative to the rest of the
cluster, warn, as this suggests this particular pool may have too few
PGs.
Signed-off-by: Sage Weil <sage@inktank.com>