mirror of https://github.com/facebook/rocksdb.git
some comment change
This commit is contained in:
parent
14676f78b4
commit
f65b1f535c
|
@ -1515,9 +1515,9 @@ class DBImpl : public DB {
|
|||
// REQUIRES: this thread is currently at the front of the main writer queue.
|
||||
// @param prep_log refers to the WAL that contains prepare record
|
||||
// for the transaction based on wbwi.
|
||||
// @param assigned_seqno Sequence number for the ingested memtable.
|
||||
// @param the value of versions_->LastSequence() after the write ingests
|
||||
// `wbwi` is done.
|
||||
// @param assigned_seqno Sequence numbers for the ingested memtable.
|
||||
// @param last_seqno the value of versions_->LastSequence() after the write
|
||||
// ingests `wbwi` is done.
|
||||
Status IngestWBWI(std::shared_ptr<WriteBatchWithIndex> wbwi,
|
||||
const WBWIMemTable::SeqnoRange& assigned_seqno,
|
||||
uint64_t min_prep_log, SequenceNumber last_seqno);
|
||||
|
|
|
@ -600,7 +600,8 @@ Status DBImpl::WriteImpl(const WriteOptions& write_options,
|
|||
// the seq per valid written key to mem.
|
||||
size_t seq_inc = seq_per_batch_ ? valid_batches : total_count;
|
||||
if (wbwi) {
|
||||
// Reserve sequence numbers for recovery. During recovery,
|
||||
// Reserve sequence numbers for the ingested memtable. We need to reserve
|
||||
// at lease this amount for recovery. During recovery,
|
||||
// transactions do not commit by ingesting WBWI. The sequence number
|
||||
// associated with the commit entry in WAL is used as the starting
|
||||
// sequence number for inserting into memtable. We need to reserve
|
||||
|
|
|
@ -447,6 +447,7 @@ void MemTableList::PickMemtablesToFlush(uint64_t max_memtable_id,
|
|||
}
|
||||
}
|
||||
if (!ret->empty() && it != memlist.rend()) {
|
||||
// checks that the first memtable not picked to flush is not ingested wbwi.
|
||||
// Ingested memtable should be flushed together with the memtable before it
|
||||
// since they map to the same WAL and have the same NextLogNumber().
|
||||
assert(strcmp((*it)->Name(), "WBWIMemTable") != 0);
|
||||
|
|
|
@ -346,8 +346,9 @@ struct TransactionOptions {
|
|||
// makes Commit() much faster for transactions with many operations.
|
||||
//
|
||||
// Note that the transaction will be ingested as an immutable memtable for
|
||||
// each CF it updates. So ingesting many transactions in a short period of
|
||||
// time may cause stall due to too many memtables.
|
||||
// CFs it updates, and the current memtable will be switched to a new one.
|
||||
// So ingesting many transactions in a short period of time may cause stall
|
||||
// due to too many memtables.
|
||||
bool commit_bypass_memtable = false;
|
||||
};
|
||||
|
||||
|
|
|
@ -358,7 +358,7 @@ class WriteBatchWithIndex : public WriteBatchBase {
|
|||
uint32_t entry_count = 0;
|
||||
uint32_t overwritten_sd_count = 0;
|
||||
};
|
||||
// Will track CF ID, per CF entry count and overwritten sd count writes.
|
||||
// Will track CF ID, per CF entry count and overwritten sd count.
|
||||
// Should be enabled when WBWI is empty for correct tracking.
|
||||
void SetTrackPerCFStat(bool track);
|
||||
const std::unordered_map<uint32_t, CFStat>& GetCFStats() const;
|
||||
|
|
|
@ -25,7 +25,6 @@ namespace ROCKSDB_NAMESPACE {
|
|||
// - live memtable contains SD(k)
|
||||
// - flush memtable and compact with L0 will drop SD(k) and PUT(k)
|
||||
// - the PUT(k) in L1 incorrectly becomes visible
|
||||
//
|
||||
// So during flush, iterator from this memtable will need emit overwritten
|
||||
// single deletion. These single deletion entries will be
|
||||
// assigned seqno.upper_bound - 1.
|
||||
|
|
|
@ -123,7 +123,6 @@ bool WriteBatchWithIndex::Rep::UpdateExistingEntryWithCfId(
|
|||
if (track_cf_stat) {
|
||||
if (non_const_entry->has_single_del &&
|
||||
!non_const_entry->has_overwritten_single_del) {
|
||||
// increment count here
|
||||
cf_id_to_stat[column_family_id].overwritten_sd_count++;
|
||||
non_const_entry->has_overwritten_single_del = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue