Skip to content

Commit a417b8f

Browse files
committed
MB-20054: Account for memory alloc/dealloc in unregisterBucket
While unregistering a bucket, any memory allocations/deallocations made should be accounted to the bucket in question. Hence no `onSwitchThread(NULL)` call. Change-Id: I5c260e3aa7e2c8d1fd4ff0a1ca20f2185a7362a8 Reviewed-on: http://review.couchbase.org/65525 Well-Formed: buildbot <[email protected]> Tested-by: buildbot <[email protected]> Reviewed-by: Will Gardner <[email protected]> Reviewed-by: Jim Walker <[email protected]>
1 parent ef481d1 commit a417b8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/executorpool.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,9 +606,10 @@ void ExecutorPool::_unregisterBucket(EventuallyPersistentEngine *engine) {
606606
}
607607

608608
void ExecutorPool::unregisterBucket(EventuallyPersistentEngine *engine) {
609-
EventuallyPersistentEngine *epe = ObjectRegistry::onSwitchThread(NULL, true);
609+
// Note: unregistering a bucket is special - any memory allocations /
610+
// deallocations made while unregistering *should* be accounted to the
611+
// bucket in question - hence no `onSwitchThread(NULL)` call.
610612
_unregisterBucket(engine);
611-
ObjectRegistry::onSwitchThread(epe);
612613
}
613614

614615
void ExecutorPool::doTaskQStat(EventuallyPersistentEngine *engine,

0 commit comments

Comments
 (0)