[SERVER-60884] Flushing Simple8bBuilder leaves state Created: 21/Oct/21  Updated: 29/Oct/23  Resolved: 22/Oct/21

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

Type: Bug Priority: Major - P3
Reporter: Henrik Edin Assignee: Henrik Edin
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: Execution Team 2021-11-01
Participants:

 Description   

Flushing Simple8bBuilder should write out all pending values and reset the state as unrelated data may be written to the BSON Column binary before we start appending new values to the Simple8bBuilder.

Currently _lastValueInPrevWord is kept so RLE may restart when appending from the wrong base value:

https://github.com/mongodb/mongo/blob/19cf54eb17cf933dfabf5a553660d93319e51713/src/mongo/bson/util/simple8b.cpp#L434

https://github.com/mongodb/mongo/blob/19cf54eb17cf933dfabf5a553660d93319e51713/src/mongo/bson/util/simple8b.cpp#L396



 Comments   
Comment by Githook User [ 21/Oct/21 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-60884 Fix so Simple8bBuilder::flush doesn't leave state for RLE
Branch: master
https://github.com/mongodb/mongo/commit/5a393055b2bcd03c9bf566a250f89c73a5e48387

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