[SERVER-45302] Only write Ninja file if the contents have changed Created: 26/Dec/19  Updated: 03/Feb/20  Resolved: 03/Feb/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mathew Robinson (Inactive) Assignee: Mathew Robinson (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-44985 Ninja builder should be able to corre... Closed
Operating System: ALL
Sprint: Dev Platform 2020-02-10
Participants:

 Description   

The Ninja builder should only rewrite the ninja file if it's buffer differs from the existing file. This will prevent the timestamp from changing and the corresponding restat by Ninja to recognize that the world does not need to be rebuilt.



 Comments   
Comment by Mathew Robinson (Inactive) [ 03/Feb/20 ]

Any gains from doing this are negated by the extra time to regenerate. ccache and icecream make it so rebuilding the world is a very fast operation if nothing has actually changed.

Comment by Githook User [ 31/Jan/20 ]

Author:

{'name': 'Mathew Robinson', 'email': 'chasinglogic@gmail.com'}

Message: Revert "SERVER-45302 Only write Ninja file if the contents have changed"

This reverts commit 66c7d6485f6e6f921b5ce455ec1d3f90dd0e1d37.
Branch: master
https://github.com/mongodb/mongo/commit/e1774c067b3074f9c28f284061d9de0820f942c7

Comment by Githook User [ 31/Jan/20 ]

Author:

{'name': 'Mathew Robinson', 'email': 'chasinglogic@gmail.com'}

Message: SERVER-45302 Only write Ninja file if the contents have changed
Branch: master
https://github.com/mongodb/mongo/commit/66c7d6485f6e6f921b5ce455ec1d3f90dd0e1d37

Comment by Mathew Robinson (Inactive) [ 06/Jan/20 ]

Note that this runs into issues for three reasons:

1. The result of merging implicit with sources and children is non-deterministic order and so would require many sort calls
2. The result of gathering the outputs from Executors is non-deterministic order
3. Response file names will be different every execution

It might be simpler to just do SERVER-44985

Generated at Thu Feb 08 05:08:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.