while (true) {
vector<ghobject_t> ls;
int r = fs->store->collection_list(
- cid, next, last, true, 1000, &ls, &next);
+ cid, next, last, 1000, &ls, &next);
if (r < 0)
return r;
for (auto p : ls) {
* @param c collection
* @param start list object that sort >= this value
* @param end list objects that sort < this value
- * @param sort_bitwise sort bitwise (instead of legacy nibblewise)
* @param max return no more than this many results
* @param seq return no objects with snap < seq
* @param ls [out] result
*/
virtual int collection_list(const coll_t& c,
const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max,
+ int max,
vector<ghobject_t> *ls, ghobject_t *next) = 0;
virtual int collection_list(CollectionHandle &c,
const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max,
+ int max,
vector<ghobject_t> *ls, ghobject_t *next) {
- return collection_list(c->get_cid(), start, end, sort_bitwise, max, ls, next);
+ return collection_list(c->get_cid(), start, end, max, ls, next);
}
dout(15) << __func__ << " " << cid << dendl;
vector<ghobject_t> ls;
ghobject_t next;
- int r = collection_list(cid, ghobject_t(), ghobject_t::get_max(), true, 1,
+ int r = collection_list(cid, ghobject_t(), ghobject_t::get_max(), 1,
&ls, &next);
if (r < 0) {
derr << __func__ << " collection_list returned: " << cpp_strerror(r)
}
int BlueStore::collection_list(
- const coll_t& cid, const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max,
+ const coll_t& cid, const ghobject_t& start, const ghobject_t& end, int max,
vector<ghobject_t> *ls, ghobject_t *pnext)
{
CollectionHandle c = _get_collection(cid);
if (!c)
return -ENOENT;
- return collection_list(c, start, end, sort_bitwise, max, ls, pnext);
+ return collection_list(c, start, end, max, ls, pnext);
}
int BlueStore::collection_list(
- CollectionHandle &c_, const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max,
+ CollectionHandle &c_, const ghobject_t& start, const ghobject_t& end, int max,
vector<ghobject_t> *ls, ghobject_t *pnext)
{
Collection *c = static_cast<Collection *>(c_.get());
int r;
{
RWLock::RLocker l(c->lock);
- r = _collection_list(c, start, end, sort_bitwise, max, ls, pnext);
+ r = _collection_list(c, start, end, max, ls, pnext);
}
c->trim_cache();
}
int BlueStore::_collection_list(
- Collection *c, const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max,
+ Collection *c, const ghobject_t& start, const ghobject_t& end, int max,
vector<ghobject_t> *ls, ghobject_t *pnext)
{
if (!c->exists)
return -ENOENT;
- if (!sort_bitwise)
- return -EOPNOTSUPP;
int r = 0;
ghobject_t static_next;
// Enumerate onodes in db, up to nonexistent_count + 1
// then check if all of them are marked as non-existent.
// Bypass the check if returned number is greater than nonexistent_count
- r = _collection_list(c->get(), ghobject_t(), ghobject_t::get_max(), true,
+ r = _collection_list(c->get(), ghobject_t(), ghobject_t::get_max(),
nonexistent_count + 1, &ls, &next);
if (r >= 0) {
bool exists = false; //ls.size() > nonexistent_count;
int _collection_list(
Collection *c, const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max, vector<ghobject_t> *ls, ghobject_t *next);
+ int max, vector<ghobject_t> *ls, ghobject_t *next);
template <typename T, typename F>
T select_option(const std::string& opt_name, T val1, F f) {
int collection_list(const coll_t& cid,
const ghobject_t& start,
const ghobject_t& end,
- bool sort_bitwise, int max,
+ int max,
vector<ghobject_t> *ls, ghobject_t *next) override;
int collection_list(CollectionHandle &c,
const ghobject_t& start,
const ghobject_t& end,
- bool sort_bitwise, int max,
+ int max,
vector<ghobject_t> *ls, ghobject_t *next) override;
int omap_get(
virtual int collection_list_partial(
const ghobject_t &start, ///< [in] object at which to start
const ghobject_t &end, ///< [in] list only objects < end
- bool sort_bitwise, ///< [in] use bitwise sort
int max_count, ///< [in] return at most max_count objects
vector<ghobject_t> *ls, ///< [out] Listed objects
ghobject_t *next ///< [out] Next object to list
vector<ghobject_t> objects;
ghobject_t max;
while (!max.is_max()) {
- r = collection_list(cid, max, ghobject_t::get_max(), true,
+ r = collection_list(cid, max, ghobject_t::get_max(),
300, &objects, &max);
if (r < 0)
return r;
RWLock::RLocker l((index.index)->access_lock);
vector<ghobject_t> ls;
- r = index->collection_list_partial(ghobject_t(), ghobject_t::get_max(), true,
+ r = index->collection_list_partial(ghobject_t(), ghobject_t::get_max(),
1, &ls, NULL);
if (r < 0) {
derr << __func__ << " collection_list_partial returned: "
int FileStore::collection_list(const coll_t& c,
const ghobject_t& orig_start,
const ghobject_t& end,
- bool sort_bitwise, int max,
+ int max,
vector<ghobject_t> *ls, ghobject_t *next)
{
ghobject_t start = orig_start;
if (cmp_bitwise(start, sep) < 0) { // bitwise vs nibble doesn't matter here
dout(10) << __func__ << " first checking temp pool" << dendl;
coll_t temp = c.get_temp();
- int r = collection_list(temp, start, end, sort_bitwise, max, ls, next);
+ int r = collection_list(temp, start, end, max, ls, next);
if (r < 0)
return r;
if (*next != ghobject_t::get_max())
assert(NULL != index.index);
RWLock::RLocker l((index.index)->access_lock);
- r = index->collection_list_partial(start, end, sort_bitwise, max, ls, next);
+ r = index->collection_list_partial(start, end, max, ls, next);
if (r < 0) {
assert(!m_filestore_fail_eio || r != -EIO);
collection_list(
cid,
next, ghobject_t::get_max(),
- true,
get_ideal_list_max(),
&objects,
&next);
collection_list(
dest,
next, ghobject_t::get_max(),
- true,
get_ideal_list_max(),
&objects,
&next);
// collections
using ObjectStore::collection_list;
int collection_list(const coll_t& c,
- const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max,
+ const ghobject_t& start, const ghobject_t& end, int max,
vector<ghobject_t> *ls, ghobject_t *next);
int list_collections(vector<coll_t>& ls);
int list_collections(vector<coll_t>& ls, bool include_temp);
int HashIndex::_collection_list_partial(const ghobject_t &start,
const ghobject_t &end,
- bool sort_bitwise,
int max_count,
vector<ghobject_t> *ls,
ghobject_t *next) {
next = &_next;
*next = start;
dout(20) << __func__ << " start:" << start << " end:" << end << "-" << max_count << " ls.size " << ls->size() << dendl;
- return list_by_hash(path, end, sort_bitwise, max_count, next, ls);
+ return list_by_hash(path, end, max_count, next, ls);
}
int HashIndex::prep_delete() {
return 0;
}
-int HashIndex::get_path_contents_by_hash_nibblewise(
- const vector<string> &path,
- const ghobject_t *next_object,
- set<string> *hash_prefixes,
- set<pair<string, ghobject_t>, CmpPairNibblewise > *objects)
-{
- map<string, ghobject_t> rev_objects;
- int r;
- r = list_objects(path, 0, 0, &rev_objects);
- if (r < 0)
- return r;
-
- for (map<string, ghobject_t>::iterator i = rev_objects.begin();
- i != rev_objects.end();
- ++i) {
- string hash_prefix = get_path_str(i->second);
- if (next_object && cmp_nibblewise(i->second, *next_object) < 0)
- continue;
- hash_prefixes->insert(hash_prefix);
- objects->insert(pair<string, ghobject_t>(hash_prefix, i->second));
- }
-
- vector<string> subdirs;
- r = list_subdirs(path, &subdirs);
- if (r < 0)
- return r;
-
- // sort nibblewise (string sort of (reversed) hex digits)
- std::sort(subdirs.begin(), subdirs.end());
-
- string cur_prefix;
- for (vector<string>::const_iterator i = path.begin();
- i != path.end();
- ++i) {
- cur_prefix.append(*i);
- }
- string next_object_string;
- if (next_object)
- next_object_string = get_path_str(*next_object);
-
- for (vector<string>::iterator i = subdirs.begin();
- i != subdirs.end();
- ++i) {
- string candidate = cur_prefix + *i;
- if (next_object) {
- if (next_object->is_max())
- continue;
- if (candidate < next_object_string.substr(0, candidate.size()))
- continue;
- }
- hash_prefixes->insert(cur_prefix + *i);
- }
- return 0;
-}
-
int HashIndex::list_by_hash(const vector<string> &path,
const ghobject_t &end,
- bool sort_bitwise,
int max_count,
ghobject_t *next,
vector<ghobject_t> *out)
{
assert(out);
- if (sort_bitwise)
- return list_by_hash_bitwise(path, end, max_count, next, out);
- else
- return list_by_hash_nibblewise(path, end, max_count, next, out);
+ return list_by_hash_bitwise(path, end, max_count, next, out);
}
int HashIndex::list_by_hash_bitwise(
return 0;
}
-int HashIndex::list_by_hash_nibblewise(
- const vector<string> &path,
- const ghobject_t& end,
- int max_count,
- ghobject_t *next,
- vector<ghobject_t> *out)
-{
- vector<string> next_path = path;
- next_path.push_back("");
- set<string> hash_prefixes;
- set<pair<string, ghobject_t>, CmpPairNibblewise> objects;
- int r = get_path_contents_by_hash_nibblewise(path,
- next,
- &hash_prefixes,
- &objects);
- if (r < 0)
- return r;
- for (set<string>::iterator i = hash_prefixes.begin();
- i != hash_prefixes.end();
- ++i) {
- dout(20) << __func__ << " prefix " << *i << dendl;
- set<pair<string, ghobject_t>, CmpPairNibblewise >::iterator j =
- objects.lower_bound(make_pair(*i, ghobject_t()));
- if (j == objects.end() || j->first != *i) {
- *(next_path.rbegin()) = *(i->rbegin());
- ghobject_t next_recurse;
- if (next)
- next_recurse = *next;
- r = list_by_hash_nibblewise(next_path,
- end,
- max_count,
- &next_recurse,
- out);
- if (r < 0)
- return r;
- if (!next_recurse.is_max()) {
- if (next)
- *next = next_recurse;
- return 0;
- }
- } else {
- while (j != objects.end() && j->first == *i) {
- if (max_count > 0 && out->size() == (unsigned)max_count) {
- if (next)
- *next = j->second;
- return 0;
- }
- if (cmp_nibblewise(j->second, end) >= 0) {
- if (next)
- *next = j->second;
- return 0;
- }
- if (!next || cmp_nibblewise(j->second, *next) >= 0) {
- out->push_back(j->second);
- }
- ++j;
- }
- }
- }
- if (next)
- *next = ghobject_t::get_max();
- return 0;
-}
int _collection_list_partial(
const ghobject_t &start,
const ghobject_t &end,
- bool sort_bitwise,
int max_count,
vector<ghobject_t> *ls,
ghobject_t *next
set<string, CmpHexdigitStringBitwise> *hash_prefixes, /// [out] prefixes in dir
set<pair<string, ghobject_t>, CmpPairBitwise> *objects /// [out] objects
);
- int get_path_contents_by_hash_nibblewise(
- const vector<string> &path, /// [in] Path to list
- const ghobject_t *next_object, /// [in] list > *next_object
- set<string> *hash_prefixes, /// [out] prefixes in dir
- set<pair<string, ghobject_t>, CmpPairNibblewise> *objects /// [out] objects
- );
/// List objects in collection in ghobject_t order
int list_by_hash(
const vector<string> &path, /// [in] Path to list
const ghobject_t &end, /// [in] List only objects < end
- bool sort_bitwise, /// [in] sort bitwise
int max_count, /// [in] List at most max_count
ghobject_t *next, /// [in,out] List objects >= *next
vector<ghobject_t> *out /// [out] Listed objects
ghobject_t *next, /// [in,out] List objects >= *next
vector<ghobject_t> *out /// [out] Listed objects
); ///< @return Error Code, 0 on success
- int list_by_hash_nibblewise(
- const vector<string> &path, /// [in] Path to list
- const ghobject_t &end, /// [in] List only objects < end
- int max_count, /// [in] List at most max_count
- ghobject_t *next, /// [in,out] List objects >= *next
- vector<ghobject_t> *out /// [out] Listed objects
- ); ///< @return Error Code, 0 on success
/// Create the given levels of sub directories from the given root.
/// The contents of *path* is not changed after calling this function.
int LFNIndex::collection_list_partial(const ghobject_t &start,
const ghobject_t &end,
- bool sort_bitwise,
int max_count,
vector<ghobject_t> *ls,
ghobject_t *next)
{
- return _collection_list_partial(start, end, sort_bitwise, max_count, ls, next);
+ return _collection_list_partial(start, end, max_count, ls, next);
}
/* Derived class utility methods */
int collection_list_partial(
const ghobject_t &start,
const ghobject_t &end,
- bool sort_bitwise,
int max_count,
vector<ghobject_t> *ls,
ghobject_t *next
virtual int _collection_list_partial(
const ghobject_t &start,
const ghobject_t &end,
- bool sort_bitwise,
int max_count,
vector<ghobject_t> *ls,
ghobject_t *next
dout(15) << __func__ << " " << cid << dendl;
vector<ghobject_t> ls;
ghobject_t next;
- int r = collection_list(cid, ghobject_t(), ghobject_t::get_max(), true, 1,
+ int r = collection_list(cid, ghobject_t(), ghobject_t::get_max(), 1,
&ls, &next);
if (r < 0) {
derr << __func__ << " collection_list returned: " << cpp_strerror(r)
}
int KStore::collection_list(
- const coll_t& cid, const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max,
+ const coll_t& cid, const ghobject_t& start, const ghobject_t& end, int max,
vector<ghobject_t> *ls, ghobject_t *pnext)
{
CollectionHandle c = _get_collection(cid);
if (!c)
return -ENOENT;
- return collection_list(c, start, end, sort_bitwise, max, ls, pnext);
+ return collection_list(c, start, end, max, ls, pnext);
}
int KStore::collection_list(
- CollectionHandle &c_, const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max,
+ CollectionHandle &c_, const ghobject_t& start, const ghobject_t& end, int max,
vector<ghobject_t> *ls, ghobject_t *pnext)
{
int r;
{
RWLock::RLocker l(c->lock);
- r = _collection_list(c, start, end, sort_bitwise, max, ls, pnext);
+ r = _collection_list(c, start, end, max, ls, pnext);
}
dout(10) << __func__ << " " << c->cid
}
int KStore::_collection_list(
- Collection* c, const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max,
+ Collection* c, const ghobject_t& start, const ghobject_t& end, int max,
vector<ghobject_t> *ls, ghobject_t *pnext)
{
- if (!sort_bitwise)
- return -EOPNOTSUPP;
-
int r = 0;
KeyValueDB::Iterator it;
string temp_start_key, temp_end_key;
// Enumerate onodes in db, up to nonexistent_count + 1
// then check if all of them are marked as non-existent.
// Bypass the check if returned number is greater than nonexistent_count
- r = _collection_list(c->get(), ghobject_t(), ghobject_t::get_max(), true,
+ r = _collection_list(c->get(), ghobject_t(), ghobject_t::get_max(),
nonexistent_count + 1, &ls, &next);
if (r >= 0) {
bool exists = false; //ls.size() > nonexistent_count;
int _collection_list(
Collection *c, const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max, vector<ghobject_t> *ls, ghobject_t *next);
+ int max, vector<ghobject_t> *ls, ghobject_t *next);
public:
KStore(CephContext *cct, const string& path);
int collection_list(
const coll_t& cid, const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max,
+ int max,
vector<ghobject_t> *ls, ghobject_t *next) override;
int collection_list(
CollectionHandle &c, const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max,
+ int max,
vector<ghobject_t> *ls, ghobject_t *next) override;
using ObjectStore::omap_get;
int MemStore::collection_list(const coll_t& cid,
const ghobject_t& start,
const ghobject_t& end,
- bool sort_bitwise, int max,
+ int max,
vector<ghobject_t> *ls, ghobject_t *next)
{
- if (!sort_bitwise)
- return -EOPNOTSUPP;
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
int collection_empty(const coll_t& c, bool *empty) override;
using ObjectStore::collection_list;
int collection_list(const coll_t& cid,
- const ghobject_t& start, const ghobject_t& end,
- bool sort_bitwise, int max,
+ const ghobject_t& start, const ghobject_t& end, int max,
vector<ghobject_t> *ls, ghobject_t *next) override;
using ObjectStore::omap_get;
ghobject_t next;
while (1) {
vector<ghobject_t> objects;
- store->collection_list(*p, next, ghobject_t::get_max(), true,
+ store->collection_list(*p, next, ghobject_t::get_max(),
store->get_ideal_list_max(),
&objects, &next);
if (objects.empty())
SnapMapper mapper(cct, &driver, 0, 0, 0, pgid.shard);
vector<ghobject_t> objects;
- store->collection_list(tmp, ghobject_t(), ghobject_t::get_max(), true,
+ store->collection_list(tmp, ghobject_t(), ghobject_t::get_max(),
INT_MAX, &objects, 0);
// delete them.
coll,
next,
ghobject_t::get_max(),
- true,
store->get_ideal_list_max(),
&olist,
&next);
ch,
_next,
ghobject_t::get_max(),
- parent->sort_bitwise(),
max - ls->size(),
&objects,
&_next);
ch,
ghobject_t(start, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard),
ghobject_t(end, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard),
- parent->sort_bitwise(),
INT_MAX,
&objects,
NULL);
int err;
std::vector<ghobject_t> b_objects, a_objects;
err = b_store->collection_list(coll, ghobject_t(), ghobject_t::get_max(),
- true, INT_MAX, &b_objects, NULL);
+ INT_MAX, &b_objects, NULL);
if (err < 0) {
dout(0) << "diff_objects list on verify coll " << coll.to_str()
<< " returns " << err << dendl;
return true;
}
err = a_store->collection_list(coll, ghobject_t(), ghobject_t::get_max(),
- true, INT_MAX, &a_objects, NULL);
+ INT_MAX, &a_objects, NULL);
if (err < 0) {
dout(0) << "diff_objects list on store coll " << coll.to_str()
<< " returns " << err << dendl;
}
-bool sorted(const vector<ghobject_t> &in, bool bitwise) {
+bool sorted(const vector<ghobject_t> &in) {
ghobject_t start;
for (vector<ghobject_t>::const_iterator i = in.begin();
i != in.end();
++i) {
- if (cmp(start, *i, bitwise) > 0) {
+ if (cmp(start, *i, true) > 0) {
cout << start << " should follow " << *i << std::endl;
return false;
}
r = apply_transaction(store, &osr, std::move(t));
ASSERT_EQ(r, 0);
}
- for (int bitwise=0; bitwise<2; ++bitwise) {
+ {
set<ghobject_t, ghobject_t::BitwiseComparator> saw;
vector<ghobject_t> objects;
ghobject_t next, current;
while (!next.is_max()) {
int r = store->collection_list(cid, current, ghobject_t::get_max(),
- (bool)bitwise, 50,
+ 50,
&objects, &next);
- if (r == -EOPNOTSUPP) {
- ++bitwise; // skip nibblewise test
- continue;
- }
ASSERT_EQ(r, 0);
- ASSERT_TRUE(sorted(objects, (bool)bitwise));
+ ASSERT_TRUE(sorted(objects));
cout << " got " << objects.size() << " next " << next << std::endl;
for (vector<ghobject_t>::iterator p = objects.begin(); p != objects.end();
++p) {
end.hobj.pool = 1;
vector<ghobject_t> objects;
ghobject_t next;
- int r = store->collection_list(cid, ghobject_t(), end,
- true, 500,
+ int r = store->collection_list(cid, ghobject_t(), end, 500,
&objects, &next);
ASSERT_EQ(r, 0);
for (auto &p : objects) {
vector<ghobject_t> objects;
ghobject_t next, current;
while (!next.is_max()) {
- int r = store->collection_list(cid, current, ghobject_t::get_max(),
- true, 50,
+ int r = store->collection_list(cid, current, ghobject_t::get_max(), 50,
&objects, &next);
ASSERT_EQ(r, 0);
cout << " got " << objects.size() << " next " << next << std::endl;
set<ghobject_t, ghobject_t::BitwiseComparator> listed, listed2;
vector<ghobject_t> objects;
- r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), true, INT_MAX, &objects, 0);
+ r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, &objects, 0);
ASSERT_EQ(r, 0);
cerr << "objects.size() is " << objects.size() << std::endl;
cid,
ghobject_t::get_max(),
ghobject_t::get_max(),
- true,
50,
&objects,
&next
listed.clear();
ghobject_t start2, next2;
while (1) {
- // nibblewise
- r = store->collection_list(cid, start2, ghobject_t::get_max(), false,
- 50,
- &objects,
- &next2);
- if (r != -EOPNOTSUPP) {
- ASSERT_TRUE(sorted(objects, false));
- ASSERT_EQ(r, 0);
- listed2.insert(objects.begin(), objects.end());
- if (objects.size() < 50) {
- ASSERT_TRUE(next2.is_max());
- }
- objects.clear();
- start2 = next2;
- }
-
- // bitwise
- r = store->collection_list(cid, start, ghobject_t::get_max(), true,
+ r = store->collection_list(cid, start, ghobject_t::get_max(),
50,
&objects,
&next);
- ASSERT_TRUE(sorted(objects, true));
+ ASSERT_TRUE(sorted(objects));
ASSERT_EQ(r, 0);
listed.insert(objects.begin(), objects.end());
if (objects.size() < 50) {
while (1) {
vector<ghobject_t> objects;
int r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(),
- true, 10, &objects, 0);
+ 10, &objects, 0);
assert(r >= 0);
if (objects.empty())
break;
ghobject_t next, current;
while (1) {
//cerr << "scanning..." << std::endl;
- int r = store->collection_list(cid, current, ghobject_t::get_max(),
- true, 100,
+ int r = store->collection_list(cid, current, ghobject_t::get_max(), 100,
&objects, &next);
ASSERT_EQ(r, 0);
- ASSERT_TRUE(sorted(objects, true));
+ ASSERT_TRUE(sorted(objects));
objects_set.insert(objects.begin(), objects.end());
objects.clear();
if (next.is_max()) break;
ASSERT_GT(available_objects.count(*i), (unsigned)0);
}
- int r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), true, INT_MAX, &objects, 0);
+ int r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(),
+ INT_MAX, &objects, 0);
ASSERT_EQ(r, 0);
objects_set2.insert(objects.begin(), objects.end());
ASSERT_EQ(objects_set2.size(), available_objects.size());
}
}
vector<ghobject_t> objects;
- r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), true, INT_MAX, &objects, 0);
+ r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, &objects, 0);
ASSERT_EQ(r, 0);
set<ghobject_t, ghobject_t::BitwiseComparator> listed(objects.begin(), objects.end());
cerr << "listed.size() is " << listed.size() << " and created.size() is " << created.size() << std::endl;
listed.clear();
ghobject_t current, next;
while (1) {
- r = store->collection_list(cid, current, ghobject_t::get_max(), true, 60,
+ r = store->collection_list(cid, current, ghobject_t::get_max(), 60,
&objects, &next);
ASSERT_EQ(r, 0);
- ASSERT_TRUE(sorted(objects, true));
+ ASSERT_TRUE(sorted(objects));
for (vector<ghobject_t>::iterator i = objects.begin();
i != objects.end();
++i) {
}
vector<ghobject_t> objects;
- r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), true,
+ r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(),
INT_MAX, &objects, 0);
ASSERT_EQ(r, 0);
set<ghobject_t, ghobject_t::BitwiseComparator> listed(objects.begin(), objects.end());
listed.clear();
ghobject_t current, next;
while (1) {
- r = store->collection_list(cid, current, ghobject_t::get_max(), true, 60,
+ r = store->collection_list(cid, current, ghobject_t::get_max(), 60,
&objects, &next);
ASSERT_EQ(r, 0);
- ASSERT_TRUE(sorted(objects, true));
+ ASSERT_TRUE(sorted(objects));
for (vector<ghobject_t>::iterator i = objects.begin();
i != objects.end(); ++i) {
if (listed.count(*i))
ObjectStore::Transaction t;
vector<ghobject_t> objects;
- r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), true,
+ r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(),
INT_MAX, &objects, 0);
ASSERT_EQ(r, 0);
ASSERT_EQ(objects.size(), num_objects);
}
objects.clear();
- r = store->collection_list(tid, ghobject_t(), ghobject_t::get_max(), true,
+ r = store->collection_list(tid, ghobject_t(), ghobject_t::get_max(),
INT_MAX, &objects, 0);
ASSERT_EQ(r, 0);
ASSERT_EQ(objects.size(), num_objects);
{
vector<ghobject_t> objects;
- r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), true,
+ r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(),
INT_MAX, &objects, 0);
ASSERT_EQ(r, 0);
ASSERT_EQ(objects.size(), 1u);
entry->m_osr.flush();
vector<ghobject_t> ls;
m_store->collection_list(entry->m_coll, ghobject_t(), ghobject_t::get_max(),
- true, INT_MAX, &ls, NULL);
+ INT_MAX, &ls, NULL);
dout(2) << __func__ << " coll " << entry->m_coll
<< " (" << ls.size() << " objects)" << dendl;
virtual int _collection_list_partial(
const ghobject_t &start,
const ghobject_t &end,
- bool sort_bitwise,
int max_count,
vector<ghobject_t> *ls,
ghobject_t *next
coll,
next,
ghobject_t::get_max(),
- true,
LIST_AT_A_TIME,
&list,
&next);
while (!next.is_max()) {
vector<ghobject_t> objects;
- int r = store->collection_list(coll, next, ghobject_t::get_max(), true, 300,
+ int r = store->collection_list(coll, next, ghobject_t::get_max(), 300,
&objects, &next);
if (r < 0)
return r;