From: Samuel Just Date: Fri, 26 Apr 2013 23:48:21 +0000 (-0700) Subject: PaxosService: use get and put for version_t X-Git-Tag: v0.61~53^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e725c3e210b244e090d70c77d937c94f4f63a2be;p=ceph.git 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 --- diff --git a/src/mon/PaxosService.cc b/src/mon/PaxosService.cc index 9484f367a6f1..d02cb1d7ab56 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,