Skip to content

Commit b8cf3ec

Browse files
committed
[SharedCache] Update the ref count warning to only show when above 2
We will have 2 live references in the DeleteController function, this warning does not need to be shown.
1 parent 9262278 commit b8cf3ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

view/sharedcache/core/SharedCacheController.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ void DeleteController(const FileMetadata& file)
3333
{
3434
auto controller = it->second;
3535
// Someone is still holding the controller, lets warn about this.
36-
if (controller->m_refs > 1)
36+
// 2 is expected here because we have one held in `controllers` and one held by `controller`.
37+
if (controller->m_refs > 2)
3738
LogWarn("Deleting SharedCacheController for view %llx, but there are still %d references", id,
3839
controller->m_refs.load());
3940

0 commit comments

Comments
 (0)