[SERVER-51492] write_unit_of_work has circular typeinfo dependency to service_context Created: 12/Oct/20 Updated: 06/Dec/22 Resolved: 09/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Moody | Assignee: | Backlog - Service Architecture |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Service Arch
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Steps To Reproduce: | To reproduce on ubuntu 18.04 work station, remove the LIBDEPS_TAG attached to the write_unit_of_work library in the SConscript as shown by this patch diff:
Then build with this SCons invocation:
You should see a build failure like this:
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Story Points: | 4 | ||||||||||||||||
| Description |
|
The library write_unit_of_work needs typeinfo for mongo::OperationContext in UBSAN builds, but if the library, service_context, which contains the definition of that typeinfo is linked to it, this caused a circular dependency between the two librarys.
We need to extract the typeinfo definition into its own library that both write_unit_of_work and service_context can link, and any other librarys that need the mongo::OperationContext typeinfo defined. Acceptance Criteria: Remove dependency of service_context on write_unit_of_work via constructor actions or other decoupling mechanisms.
|