[SERVER-60156] Add a way to bypass storageValid() for time-series updates Created: 22/Sep/21  Updated: 29/Oct/23  Resolved: 30/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc0, 5.0.22

Type: Task Priority: Major - P3
Reporter: Henrik Edin Assignee: Yuhong Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
is caused by SERVER-56755 Collect and expose statistics for ins... Closed
Related
related to SERVER-60176 Delta-updates should only validate th... Closed
related to SERVER-61587 Research potential improvements in do... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Execution Team 2021-10-04
Participants:
Linked BF Score: 135

 Description   

storage_validation::storageValid is called by ObjectReplaceExecutor::applyReplacementUpdate even when validateForStorage is set to false. It scans the bucket document for . or $ characters in field names. As the bucket document grows this gets slower and slower and we basically have quadratic time complexity.

None of this should be needed for timeseries updates as we control the data. We should have a way to skip this. Commenting out the line gives 60% better single threaded insert performance using tsbs.



 Comments   
Comment by Githook User [ 02/Oct/23 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}

Message: SERVER-60156 SERVER-60176 Skip storageValid() for time-series updates and when applying the oplog on secondary

(cherry picked from commit 7591af2652cd1d00f9255033dc5ec3c3d82deca3)
(cherry picked from commit 21c2ad8764c396fc6afae226bbcea8c780e6bdee)

Co-authored-by: Nikita Lapkov <nikita.lapkov@mongodb.com>
Branch: v5.0
https://github.com/mongodb/mongo/commit/9be121627729aa754711f3ff1757ff789da300b5

Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 29/Sep/21 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}

Message: SERVER-60156 Add a way to bypass storageValid() for time-series updates
Branch: master
https://github.com/mongodb/mongo/commit/7591af2652cd1d00f9255033dc5ec3c3d82deca3

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