]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/tools/db_repl_stress.cc
import quincy beta 17.1.0
[ceph.git] / ceph / src / rocksdb / tools / db_repl_stress.cc
index 717f5d3d847cba37b91a1db07779e73f03bdf8e2..794ac1530e1ab22b406f2e4125e3fc6427328ca0 100644 (file)
@@ -37,20 +37,14 @@ struct DataPumpThread {
   DB* db;  // Assumption DB is Open'ed already.
 };
 
-static std::string RandomString(Random* rnd, int len) {
-  std::string r;
-  test::RandomString(rnd, len, &r);
-  return r;
-}
-
 static void DataPumpThreadBody(void* arg) {
   DataPumpThread* t = reinterpret_cast<DataPumpThread*>(arg);
   DB* db = t->db;
   Random rnd(301);
   size_t i = 0;
   while (i++ < t->no_records) {
-    if (!db->Put(WriteOptions(), Slice(RandomString(&rnd, 500)),
-                 Slice(RandomString(&rnd, 500)))
+    if (!db->Put(WriteOptions(), Slice(rnd.RandomString(500)),
+                 Slice(rnd.RandomString(500)))
              .ok()) {
       fprintf(stderr, "Error in put\n");
       exit(1);