Skip to content

Commit 0c84c55

Browse files
BenHuddlestondaverigby
authored andcommitted
MB-45459: Remove unused param from VBucket::accountItem()
With the previous change for this MB the parameter is no longer required. Change-Id: I7fc85a4d764bede47007d54ec16844a70a2146c2 Reviewed-on: http://review.couchbase.org/c/kv_engine/+/151034 Tested-by: Build Bot <[email protected]> Reviewed-by: Trond Norbye <[email protected]>
1 parent ff66224 commit 0c84c55

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

engines/ep/src/vbucket.cc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -696,18 +696,13 @@ void VBucket::doStatsForQueueing(const Item& qi, size_t itemBytes)
696696
dirtyQueuePendingWrites.fetch_add(itemBytes);
697697
}
698698

699-
void VBucket::AggregatedFlushStats::accountItem(
700-
const Item& item,
701-
std::optional<std::chrono::steady_clock::time_point> queueTime) {
699+
void VBucket::AggregatedFlushStats::accountItem(const Item& item) {
702700
Expects(item.getQueuedTime().time_since_epoch().count() != 0);
703-
if (!queueTime) {
704-
queueTime = item.getQueuedTime();
705-
}
706701

707702
++numItems;
708703
totalBytes += item.size();
709704
totalAgeInMicro += std::chrono::duration_cast<std::chrono::microseconds>(
710-
queueTime->time_since_epoch())
705+
item.getQueuedTime().time_since_epoch())
711706
.count();
712707
}
713708

engines/ep/src/vbucket.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -477,12 +477,8 @@ class VBucket : public std::enable_shared_from_this<VBucket> {
477477
/**
478478
* Add the stored values from the Item
479479
* @param Item being accounted
480-
* @param queueTime optional queueTime. If not supplied, takes the
481-
* queueTime of the Item.
482480
*/
483-
void accountItem(const Item& item,
484-
std::optional<std::chrono::steady_clock::time_point>
485-
queueTime = {});
481+
void accountItem(const Item& item);
486482

487483
size_t getNumItems() const {
488484
return numItems;

0 commit comments

Comments
 (0)