summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-07-26 15:08:56 -0700
committerSage Weil <sage@inktank.com>2013-07-26 15:08:56 -0700
commit10959404b30aa05c9d416b2a39aaae7d5641389a (patch)
treee22318b0f05f3afbab20640deb72f8c35d4a600e
parent792280cf060300f6a2c169599055bfedeb3c553d (diff)
parentde51aac8acfc6db08a0823f65933943f274e70f0 (diff)
downloadceph-10959404b30aa05c9d416b2a39aaae7d5641389a.tar.gz
Merge pull request #470 from dalgaaf/wip-da-CID-3.v2
Fix several CID issues - v2 Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r--src/rgw/rgw_metadata.cc1
-rw-r--r--src/rgw/rgw_rest_log.cc2
-rw-r--r--src/test/cls_log/test_cls_log.cc17
-rw-r--r--src/test/cls_statelog/test_cls_statelog.cc1
-rw-r--r--src/test/cls_version/test_cls_version.cc6
5 files changed, 12 insertions, 15 deletions
diff --git a/src/rgw/rgw_metadata.cc b/src/rgw/rgw_metadata.cc
index 8fc79e69b12..6da1ff5ab24 100644
--- a/src/rgw/rgw_metadata.cc
+++ b/src/rgw/rgw_metadata.cc
@@ -243,6 +243,7 @@ RGWMetadataManager::~RGWMetadataManager()
}
handlers.clear();
+ delete md_log;
}
int RGWMetadataManager::register_handler(RGWMetadataHandler *handler)
diff --git a/src/rgw/rgw_rest_log.cc b/src/rgw/rgw_rest_log.cc
index 544adbe7965..7b50986cb37 100644
--- a/src/rgw/rgw_rest_log.cc
+++ b/src/rgw/rgw_rest_log.cc
@@ -88,6 +88,8 @@ void RGWOp_MDLog_List::execute() {
if (!max_entries_str.empty())
max_entries -= entries.size();
} while (truncated && (max_entries > 0));
+
+ meta_log->complete_list_entries(handle);
}
void RGWOp_MDLog_List::send_response() {
diff --git a/src/test/cls_log/test_cls_log.cc b/src/test/cls_log/test_cls_log.cc
index a8d1b3d5300..ce97025f819 100644
--- a/src/test/cls_log/test_cls_log.cc
+++ b/src/test/cls_log/test_cls_log.cc
@@ -118,14 +118,10 @@ TEST(cls_rgw, test_log_add_same_time)
/* add chains */
string oid = "obj";
-
/* create object */
-
ASSERT_EQ(0, ioctx.create(oid, true));
-
/* generate log */
-
utime_t start_time = ceph_clock_now(g_ceph_context);
generate_log(ioctx, oid, 10, start_time, false);
@@ -206,14 +202,10 @@ TEST(cls_rgw, test_log_add_different_time)
/* add chains */
string oid = "obj";
-
/* create object */
-
ASSERT_EQ(0, ioctx.create(oid, true));
-
/* generate log */
-
utime_t start_time = ceph_clock_now(g_ceph_context);
generate_log(ioctx, oid, 10, start_time, true);
@@ -227,7 +219,6 @@ TEST(cls_rgw, test_log_add_different_time)
string marker;
/* check list */
-
cls_log_list(*rop, start_time, to_time, marker, 0, entries, &marker, &truncated);
bufferlist obl;
@@ -258,7 +249,6 @@ TEST(cls_rgw, test_log_add_different_time)
reset_rop(&rop);
/* check list again with shifted time */
-
utime_t next_time = get_time(start_time, 1, true);
marker.clear();
@@ -289,7 +279,7 @@ TEST(cls_rgw, test_log_add_different_time)
} while (truncated);
ASSERT_EQ(10, i);
-
+ delete rop;
}
TEST(cls_rgw, test_log_trim)
@@ -305,14 +295,10 @@ TEST(cls_rgw, test_log_trim)
/* add chains */
string oid = "obj";
-
/* create object */
-
ASSERT_EQ(0, ioctx.create(oid, true));
-
/* generate log */
-
utime_t start_time = ceph_clock_now(g_ceph_context);
generate_log(ioctx, oid, 10, start_time, true);
@@ -344,4 +330,5 @@ TEST(cls_rgw, test_log_trim)
ASSERT_EQ(9 - i, (int)entries.size());
ASSERT_EQ(0, (int)truncated);
}
+ delete rop;
}
diff --git a/src/test/cls_statelog/test_cls_statelog.cc b/src/test/cls_statelog/test_cls_statelog.cc
index 33028f4fbad..a1b4cc34efc 100644
--- a/src/test/cls_statelog/test_cls_statelog.cc
+++ b/src/test/cls_statelog/test_cls_statelog.cc
@@ -70,6 +70,7 @@ static void get_entries_by_object(librados::IoCtx& ioctx, string& oid,
cls_statelog_list(*rop, empty_str, op_id, object, marker, 0, entries, &marker, &truncated);
ASSERT_EQ(0, ioctx.operate(oid, rop, &obl));
ASSERT_EQ(expected, (int)entries.size());
+ delete rop;
}
static void get_entries_by_client_id(librados::IoCtx& ioctx, string& oid,
diff --git a/src/test/cls_version/test_cls_version.cc b/src/test/cls_version/test_cls_version.cc
index acce4f00cf4..4c2d59500df 100644
--- a/src/test/cls_version/test_cls_version.cc
+++ b/src/test/cls_version/test_cls_version.cc
@@ -270,14 +270,17 @@ TEST(cls_rgw, test_version_inc_check)
bufferlist bl;
ASSERT_EQ(0, ioctx.operate(oid, rop, &bl));
+ delete rop;
rop = new_rop();
cls_version_check(*rop, cond_ver, VER_COND_GE);
ASSERT_EQ(0, ioctx.operate(oid, rop, &bl));
+ delete rop;
rop = new_rop();
cls_version_check(*rop, cond_ver, VER_COND_LE);
ASSERT_EQ(0, ioctx.operate(oid, rop, &bl));
+ delete rop;
rop = new_rop();
cls_version_check(*rop, cond_ver, VER_COND_TAG_EQ);
ASSERT_EQ(0, ioctx.operate(oid, rop, &bl));
@@ -296,14 +299,17 @@ TEST(cls_rgw, test_version_inc_check)
delete op;
/* a bunch of conditions that should fail */
+ delete rop;
rop = new_rop();
cls_version_check(*rop, ver, VER_COND_LT);
ASSERT_EQ(-ECANCELED, ioctx.operate(oid, rop, &bl));
+ delete rop;
rop = new_rop();
cls_version_check(*rop, cond_ver, VER_COND_LE);
ASSERT_EQ(-ECANCELED, ioctx.operate(oid, rop, &bl));
+ delete rop;
rop = new_rop();
cls_version_check(*rop, cond_ver, VER_COND_TAG_NE);
ASSERT_EQ(-ECANCELED, ioctx.operate(oid, rop, &bl));