[SERVER-77731] merge OpStateAccumulator and InsertsOpStateAccumulator in OpObserver interface Created: 02/Jun/23  Updated: 29/Oct/23  Resolved: 13/Jun/23

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

Type: Improvement Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: techdebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-76271 Remove OpObserverShardingImpl Depende... Closed
is related to SERVER-76636 Add accumulator to OpObserver::onInserts Closed
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2023-06-12, Execution NAMR Team 2023-06-26
Participants:

 Description   

Most of the OpObserver methods use OpStateAccumulator with the exception of onInserts(), which uses InsertsOpStateAccumulator to hold multiple OpTimes.

We should look into merging these two structs to provide a common data structure for all the OpObserver methods.

One suggestion provided was to use a data structure such as absl::InlinedVector to combine the single/vector OpTime fields.



 Comments   
Comment by Githook User [ 13/Jun/23 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-77731 remove InsertsOpStateAccumulator alias
Branch: master
https://github.com/mongodb/mongo/commit/0a17c2c5e4abffc36469403f1fa7713be18cb502

Comment by Githook User [ 11/Jun/23 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-77731 merge OpStateAccumulator and InsertsOpStateAccumulator

InsertsOpStateAccumulator is now an alias to OpStateAccumulator
Branch: master
https://github.com/mongodb/mongo/commit/5e0812e8cd77f426cbee1caca969fabe1fa31062

Comment by Githook User [ 09/Jun/23 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-77731 move insert optimes in OpObserverImpl instead of copy
Branch: master
https://github.com/mongodb/mongo/commit/4b7d574a88e99b43ce17a0914af6b6bcb0dac039

Comment by Benety Goh [ 02/Jun/23 ]

This improvement was suggested while reviewing SERVER-76271.

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