dout(10) << __func__ << " trimming" << dendl;
MonitorDBStore::Transaction t;
- encode_trim(&t);
+ encode_trim(&t, get_trim_to());
bufferlist bl;
t.encode(bl);
paxos->propose_new_value(bl, new C_Committed(this));
}
-void PaxosService::encode_trim(MonitorDBStore::Transaction *t)
+void PaxosService::encode_trim(MonitorDBStore::Transaction *t, version_t trim_to)
{
version_t first_committed = get_first_committed();
version_t latest_full = get_version_latest_full();
- version_t trim_to = get_trim_to();
dout(10) << __func__ << " " << trim_to << " (was " << first_committed << ")"
<< ", latest full " << latest_full << dendl;
* 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.
- * @param force Optional. Each service may use it as it sees fit, but the
- * expected behavior is that, when 'true', we will remove all
- * the log versions even if we don't have a full map in store.
*/
- void encode_trim(MonitorDBStore::Transaction *t);
+ void encode_trim(MonitorDBStore::Transaction *t, version_t first);
/**
* encode service-specific extra bits into trim transaction