[SERVER-35940] Remove IntrusiveCounter in favor of RefCountable Created: 02/Jul/18  Updated: 29/Oct/23  Resolved: 10/Jul/18

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Internal Code
Affects Version/s: None
Fix Version/s: 4.1.1

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: Martin Neupauer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-35894 Create a $exchange producer stage Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2018-07-16
Participants:

 Description   

IntrusiveCounter is a base class used to make a type suitable for use with boost::intrusive_ptr. It has surprising behavior under concurrency, which can lead to bugs such as SERVER-32007. RefCountable is a superior alternative. We should migrate existing uses of IntrusiveCounter to RefCountable, and delete the IntrusiveCounter code. As of this writing, the only remaining subclass of IntrusiveCounter is DocumentSource in the aggregation framework code.



 Comments   
Comment by Githook User [ 10/Jul/18 ]

Author:

{'username': 'MartinNeupauer', 'name': 'Martin Neupauer', 'email': 'martin.neupauer@10gen.com'}

Message: SERVER-35940 Remove IntrusiveCounter
Branch: master
https://github.com/mongodb/mongo/commit/01cf7a585de2942562837077dff73968562b91f3

Comment by David Storch [ 06/Jul/18 ]

Reopening. The patch pushed thus far removes the last usage of InstrusiveCounter and IntrusiveCounterUnsigned. We should push one more patch to delete these two classes entirely.

Comment by Githook User [ 06/Jul/18 ]

Author:

{'username': 'MartinNeupauer', 'name': 'Martin Neupauer', 'email': 'martin.neupauer@10gen.com'}

Message: SERVER-35894 The initial implementation of the producer document source
for the exchange operator.
SERVER-35940 Remove IntrusiveCounter in favor of RefCountable.
Branch: master
https://github.com/mongodb/mongo/commit/fda766f6be1a20fa28ce361511bc62e5c995186b

Comment by Charlie Swanson [ 03/Jul/18 ]

Martin.neupauer encountered the same issue while working on SERVER-35894. His issue was with DocumentSource, but he believes he can do the same replacement for Expression.

Assigning to him for this sprint since he's already started working on it.

Generated at Thu Feb 08 04:41:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.