summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-04-26 16:48:21 -0700
committerSamuel Just <sam.just@inktank.com>2013-04-26 17:19:59 -0700
commite725c3e210b244e090d70c77d937c94f4f63a2be (patch)
treef2f3e51bc23f26d836bcf3d71d3a17437fef5c5e
parent1e6c390a67b2500d5a934b6537b8c7e9e1f096c6 (diff)
downloadceph-e725c3e210b244e090d70c77d937c94f4f63a2be.tar.gz
PaxosService: use get and put for version_t
Otherwise, we just duplicate the logic for generating the version key names. Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/mon/PaxosService.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mon/PaxosService.cc b/src/mon/PaxosService.cc
index 9484f367a6f..d02cb1d7ab5 100644
--- a/src/mon/PaxosService.cc
+++ b/src/mon/PaxosService.cc
@@ -294,19 +294,13 @@ void PaxosService::put_version(MonitorDBStore::Transaction *t,
const string& prefix, version_t ver,
bufferlist& bl)
{
- ostringstream os;
- os << ver;
- string key = mon->store->combine_strings(prefix, os.str());
- t->put(get_service_name(), key, bl);
+ t->put(get_service_name(), ver, bl);
}
int PaxosService::get_version(const string& prefix, version_t ver,
bufferlist& bl)
{
- ostringstream os;
- os << ver;
- string key = mon->store->combine_strings(prefix, os.str());
- return mon->store->get(get_service_name(), key, bl);
+ return mon->store->get(get_service_name(), ver, bl);
}
void PaxosService::trim(MonitorDBStore::Transaction *t,