Commit Graph

31888 Commits

Author SHA1 Message Date
Samuel Just
ae59ba3cef Merge pull request #1304 from ceph/wip-last-epoch-clean
mon: fix min_last_epoch_clean handling

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-02-23 15:32:18 -08:00
Sage Weil
dcb9946b1a Merge pull request #1306 from ceph/wip-7512
wip-7512

Reviewed-by: Sage Weil <sage@inktank.com>
2014-02-23 14:48:10 -08:00
Samuel Just
696fa36d3f OSD::project_pg_history needs to account for acting_primary/up_primary
Fixes: #7512
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-23 13:35:16 -08:00
Samuel Just
0442b456b9 Objecter/OSDMap: factor out primary_changed() into static OSDMap method
We need to reuse this logic in OSD::project_pg_history.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-23 13:35:16 -08:00
Samuel Just
d0359f7c1c PG: clarify same_primary_since updates regarding primary rank
pg_shard_t includes the position, so these checks handle
same osd/different rank properly.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-23 13:35:16 -08:00
Sage Weil
73c59a022f mon/PGMap: fix osd_epochs update
The insert() call here does not overwrite a previous entry, which means
that the osd_epochs map is never moving forward in time.  This seems to
have been broken since it was introduced in 091809b814.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-23 12:15:27 -08:00
Sage Weil
df3ba724d5 mon/PGMap: add unit test for min_last_epoch_clean
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-23 12:15:27 -08:00
Samuel Just
8913ab4bb5 ECBackend: skip canceled xattr reads as well
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-23 12:14:23 -08:00
Sage Weil
23e538efa4 client: fix possible null dereference in create
There are two paths that jump to the out label for which 'in' can be
NULL and outp can be non-NULL.  For those cases we want to fill in the
caller's pointer value (they asked for it) but we clearly cannot take
a reference.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-23 10:18:02 -08:00
Sage Weil
bcc18d4877 osd: increase default leveldb write buffer, cache size
The FileStore's leveldb currently uses libleveldb's defaults for cache and
write buffer size, which are both 4 MB. Increase the cache size to 128MB and
the write buffer to 8MB.

Tested-by: Dmitry Smirnov <onlyjob@member.fsf.org>
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-23 10:05:39 -08:00
Sage Weil
c4a3a86a33 ceph_test_objectstore: fix i386 build error
We can't swap size_t and uint64_t; just change the len type to match.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-23 09:05:56 -08:00
Sage Weil
b25c22a20a ceph_test_objectstore: fix signed/unsigned warning
In file included from test/objectstore/store_test.cc:33:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int]’:
../src/gtest/include/gtest/gtest.h:1300:30: instantiated from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int, bool lhs_is_null_literal = false]’
test/objectstore/store_test.cc:484:193: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-23 09:03:42 -08:00
Loic Dachary
1340b360b5 erasure-code: test that changing the pool size is not allowed
http://tracker.ceph.com/issues/7360 fixes #7360

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-23 07:52:59 -08:00
Sage Weil
24c89bf01c Merge pull request #1294 from ceph/wip-librados-object-iterator
fix bugs in librados::ObjectIterator

Reviewed-by: Sage Weil <sage@inktank.com>
2014-02-23 07:25:13 -08:00
Sage Weil
5c4129dfb8 Merge pull request #1295 from yuyuyu101/keyvaluestore-enhance
Keyvaluestore enhance(backport to firely)

Pulling this into firefly because it doesn't (substantiatively) touch anything outside of KeyValueStore.

Reviewed-by: Sage Weil <sage@inktank.com>
2014-02-23 07:24:43 -08:00
Sage Weil
8ef0d7e6e8 Merge pull request #1297 from ceph/wip-ec-bugs
Wip ec bugs

Reviewed-by: Sage Weil <sage@inktank.com>
2014-02-23 07:12:40 -08:00
Sage Weil
6d8cb22e58 unittest_ecbackend: fix signed/unsigned warnings
In file included from test/osd/TestECBackend.cc:20:0:
../src/gtest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
../src/gtest/include/gtest/gtest.h:1300:30: required from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
test/osd/TestECBackend.cc:30:281: required from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-22 22:00:55 -08:00
Sage Weil
bff4a3bf42 Merge pull request #1301 from ceph/wip-scrub-primary
mon/PGMonitor: fix primary osd check on deep-scrub

gitbuilders are now passing
2014-02-22 21:56:53 -08:00
Sage Weil
fed655e3e9 mon/PGMonitor: fix primary osd check on deep-scrub
s/!=/==/.  Logic was reversed.

Broken in 40bdcb8850.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-22 21:31:48 -08:00
Samuel Just
5516f8c1ff Merge pull request #1300 from ceph/wip-7513
PGLog::activate_not_complete typo

Reviewed-by: David Zafman <david.zafman@inktank.com>
2014-02-22 17:35:46 -08:00
Samuel Just
7b0f3d9092 PGLog::activate_not_complete: fix log.complete_to increment typo
info.last_complete should be the entry before log.complete_to.

This appears to have been a typo introduced in
dd71051a8f.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-22 17:24:29 -08:00
Samuel Just
885d19631e Merge pull request #1298 from ceph/wip-subscribe
osd: fix off-by-one is boot subscription

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-02-22 17:18:55 -08:00
David Zafman
bfb3a2479a Merge pull request #1299 from ceph/wip-repair
osd/PG: fix assert when a shallow repair has fixed all errors.

Reviewed-by: David Zafman <david.zafman@inktank.com>
2014-02-22 14:55:08 -08:00
David Zafman
e3e3328ec8 osd/PG: fix assert when deep repair finds no errors
If there are no deep repairs, we don't want to assert.
Fixes:

    -1> 2014-02-21 21:13:56.393087 7f0258ff9700  0 log [INF] : 0.0 repair ok, 0 fixed
     0> 2014-02-21 21:13:56.428703 7f0258ff9700 -1 osd/PG.cc: In function 'void PG::scrub_finish()' thread 7f0258ff9700 time 2014-02-21 21:13:56.393127
osd/PG.cc: 4294: FAILED assert(deep_scrub)

Signed-off-by: David Zafman <david.zafman@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-22 13:51:18 -08:00
Samuel Just
9da4d40ecc PGLog: test for missing using the correct shard value
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-22 12:37:55 -08:00
Samuel Just
ace65fec8b OSD: fix query for ec pgs
We need to parse a pg_t and translate it into an spg_t.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-22 12:37:55 -08:00
Samuel Just
93983c9590 Objecter: make is_pg_changed static and const for old/newacting
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-22 12:37:55 -08:00
Samuel Just
8b4cf1c09b OSDMap: make calc_pg_rank/role const for acting
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-22 12:37:55 -08:00
Samuel Just
005b4fad14 Objecter: resend op if primary role changed
Fixes: #7508
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-22 12:37:50 -08:00
Samuel Just
b7de0fdbcd ECTransaction: require hash_infos for deleted objects
Otherwise, an append preceded by a delete may not see the
correct HashInfo state since it won't have been cached
until the delete is applied.

Fixes: #7506
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-22 12:35:40 -08:00
Samuel Just
ab4c9a67df ECUtil: clear() should reset hashes to -1, not 0
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-22 12:35:40 -08:00
Samuel Just
8593ad76fc ReplicatedPG::cancel_pull: ECBackend might cancel_pull on a non-missing object
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-22 12:35:40 -08:00
Samuel Just
9b85241324 ECBackend::filter_read_op: clean up read state properly
Fixes: #7494
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-22 12:35:40 -08:00
Sage Weil
70d23b9a0a osd: fix off-by-one is boot subscription
If we have osdmap N, we want to onetime subscribe
starting at N+1.  Among other things, it means we
hear when the NOUP flag is cleared.

This appears to have broken somewhere around
3c76b81f2f.

Fixes: #7511
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-22 08:08:37 -08:00
Haomai Wang
90ebdcc4a6 Rename keyvaluestore_check_backend to keyvaluestore_debug_check_backend
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 23:57:02 +08:00
Haomai Wang
a52d7cd03b Add KeyValueStore op thread options
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:01 +08:00
Haomai Wang
62c1631f1d Remove eio inject codes in KeyValueStore
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:01 +08:00
Haomai Wang
8c4d865900 Add config tracker to KeyValueStore
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:01 +08:00
Haomai Wang
697411c8e0 Add backend check option to KeyValueStore
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:01 +08:00
Haomai Wang
9543664b87 Remove filestore_inject_stall
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:01 +08:00
Haomai Wang
dcfe098cbe Remove m_eio in KeyValueStore
KeyValueStore use kv backend to detect errors and nearly can't know the actual
reason for error.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:01 +08:00
Haomai Wang
4b3bf3e225 Make SequencePosition sync by each transaction
Each object modify will increase SequencePosition and sync it to disk

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:01 +08:00
Haomai Wang
ec8a419344 Implement collection_rename interface in KeyValueStore
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:00 +08:00
Haomai Wang
6314350f16 Remove unnecessary "check_coll" check
The goal of "check_coll" is aimed to ensure the collection is exists. But
the create and delete of collection already ensured by OSD, just remove check.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:00 +08:00
Haomai Wang
88bec06531 Optimize write call add enhance error detect
A single write call may need several keys in the backend kv store. Let get these
keys one time.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:00 +08:00
Haomai Wang
2a363d6737 Unify object level lock in GenericObjectMap
Before we copy lock implementation from DBObjectMap which provide with two locks
for header. Here just unify it to make ease.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:00 +08:00
Haomai Wang
a9fa341ee2 Fix incorrect read and truncate
If the first chunk of object is not read entirely, the current implementation
will contain it entirely which make wrong.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:00 +08:00
Haomai Wang
9ed295818b Return 0 when the offset of read exceed the length of object
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:00 +08:00
Haomai Wang
3e6a1fc6e8 Add read/write operation to store_test.cc
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:05:00 +08:00
Haomai Wang
4e7f1de943 Adjust some interfaces to optimize caller codes
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-02-22 21:04:59 +08:00