[SERVER-76540] Skip updating dataSize increase in updates if they don't modify the number Created: 26/Apr/23  Updated: 29/Oct/23  Resolved: 27/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.0-rc2

Type: Improvement Priority: Major - P3
Reporter: Jordi Olivares Provencio Assignee: Jordi Olivares Provencio
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0
Sprint: Execution Team 2023-05-01
Participants:
Linked BF Score: 122

 Description   

When performing updates we always update the dataSize metric with the difference in size of the new and old entries. This performs some atomic arithmetic and performs a heap allocation for rollback handling to revert the arithmetic performed.

If the update doesn't modify the size, the metrics will be incremented/decremented by 0 so all of this is unnecessary.



 Comments   
Comment by Githook User [ 19/May/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-76540 Skip updating dataSize if difference is 0
Branch: v7.0
https://github.com/mongodb/mongo/commit/f684e9fed2873dd3c82197a5933446402df5e6c4

Comment by Githook User [ 26/Apr/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-76540 Skip updating dataSize if difference is 0
Branch: master
https://github.com/mongodb/mongo/commit/b4d2d00067a735a875112817f5ca3bd03d27f3cd

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