dout(10) << __func__ << " trimming to " << trim_to << ", " << to_remove << " states" << dendl;
MonitorDBStore::Transaction t;
- encode_trim(&t, trim_to);
+ trim(&t, get_first_committed(), trim_to);
+ put_first_committed(&t, trim_to);
+
+ // let the service add any extra stuff
+ encode_trim_extra(&t, trim_to);
+
bufferlist bl;
t.encode(bl);
-
paxos->propose_new_value(bl, new C_Committed(this));
}
-void PaxosService::encode_trim(MonitorDBStore::Transaction *t, version_t trim_to)
-{
- dout(10) << __func__ << " to " << trim_to << dendl;
- trim(t, get_first_committed(), trim_to);
- put_first_committed(t, trim_to);
-
- // let the service add any extra stuff
- encode_trim_extra(t, trim_to);
-}
-
void PaxosService::trim(MonitorDBStore::Transaction *t,
version_t from, version_t to)
{
* @param to the upper limit of the interval to be trimmed (not including)
*/
void trim(MonitorDBStore::Transaction *t, version_t from, version_t to);
- /**
- * Trim our log
- *
- * Will call encode_trim_extra(), allowing services to add
- * additional bits to the trim transaction.
- *
- * @param txn the transaction to encode to
- * @param first The version that should become the first one in the log.
- */
- void encode_trim(MonitorDBStore::Transaction *t, version_t first);
/**
* encode service-specific extra bits into trim transaction