From 75e9fbba9d7cf014b050e969d8673984beb2088d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 10 Dec 2014 13:40:32 -0800 Subject: [PATCH] os/ObjectStore: deprecated collection_move You will not be missed! Signed-off-by: Sage Weil --- src/os/ObjectStore.h | 3 ++- src/os/Transaction.cc | 2 +- src/test/objectstore/DeterministicOpSequence.cc | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index 5fbc869785ef8..e7d889c3c1d78 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -1241,7 +1241,8 @@ public: } data.ops++; } - void collection_move(coll_t cid, coll_t oldcid, const ghobject_t& oid) { + void collection_move(coll_t cid, coll_t oldcid, const ghobject_t& oid) + __attribute__ ((deprecated)) { // NOTE: we encode this as a fixed combo of ADD + REMOVE. they // always appear together, so this is effectively a single MOVE. if (use_tbl) { diff --git a/src/os/Transaction.cc b/src/os/Transaction.cc index fdbfa3bdb5f16..07655b3f70c39 100644 --- a/src/os/Transaction.cc +++ b/src/os/Transaction.cc @@ -975,7 +975,7 @@ void ObjectStore::Transaction::generate_test_instances(listclone_range(c, o1, o2, 1, 12, 99); t->create_collection(c); - t->collection_move(c, c2, o3); + t->collection_move_rename(c, o2, c2, o3); t->remove_collection(c); t->collection_setattr(c, string("this"), bl); t->collection_rmattr(c, string("foo")); diff --git a/src/test/objectstore/DeterministicOpSequence.cc b/src/test/objectstore/DeterministicOpSequence.cc index d25b1f7cb326e..3af0ed7bb695d 100644 --- a/src/test/objectstore/DeterministicOpSequence.cc +++ b/src/test/objectstore/DeterministicOpSequence.cc @@ -532,7 +532,7 @@ void DeterministicOpSequence::_do_coll_move(coll_t orig_coll, coll_t new_coll, ObjectStore::Transaction t; note_txn(&t); t.remove(new_coll, obj); - t.collection_move(new_coll, orig_coll, obj); + t.collection_move_rename(orig_coll, obj, new_coll, obj); m_store->apply_transaction(t); } -- 2.39.5