[SERVER-35143] DecorationRegistry destroys decorations in the wrong order Created: 22/May/18  Updated: 29/Oct/23  Resolved: 22/Oct/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 3.7.2
Fix Version/s: 4.1.5

Type: Bug Priority: Major - P3
Reporter: Andy Schwerin Assignee: ADAM Martin (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2018-10-22, Service Arch 2018-11-05
Participants:

 Description   

Prior to the fix for SERVER-33437, the DecorationRegistry destroyed decorations in the reverse of the order in which they were constructed. This was by design, to allow for a system in which decorations could be declared on a registry in a certain order, and a developer could expect decoration construction and destruction to proceed in an order similar to regular member variables – constructed in order of declaration, destroyed in reverse order.

We should restore that ordering, in case anyone wishes to depend on it in the future, and we should test for it.



 Comments   
Comment by Githook User [ 22/Oct/18 ]

Author:

{'name': 'ADAM David Alan Martin', 'email': 'adam.martin@10gen.com', 'username': 'adamlsd'}

Message: SERVER-35143 Destroy decorations in reverse order.

To better match what normal behavior is for C++ destructors of
objects, the Decoration system should destroy decorations in
the reverse order of their creation.
Branch: master
https://github.com/mongodb/mongo/commit/a3901f35219d47ed6a619ac3b6b91c1dd0efd907

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