[SERVER-63199] Add new compact skeleton for mongod Created: 01/Feb/22  Updated: 29/Oct/23  Resolved: 12/Feb/22

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

Type: Task Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Erwin Pe
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Security 2022-02-07, Security 2022-02-21
Participants:
Linked BF Score: 33

 Description   

Add skeletons for compactStructuredEncryptionData to mongod and mongos. Also add support for initial rename collection in both mongod and mongos. There is likely the opportunity for a lot of code reuse.

Here is the IDL that describes compactStructuredEncryptionData:

structs:
 
    ECOCStats:
        description: "Stats about records in ECOC compact touched"
        fields:
            read : exactInt64
            deleted : exactInt64
 
    ECStats:
        description: "Stats about records in ECC & ESC compact touched"
        fields:
            read : exactInt64
            inserted : exactInt64
            updated : exactInt64
            deleted : exactInt64
 
    compactStats:
        description: "Stats about records in ECC, ECOC and ESC compact touched"
        fields:
            ecoc: ECOCStats
            ecc: ECStats
            esc: ECStats
 
 
    CompactStructuredEncryptionDataCommandReply:
        description: 'Reply from the {compactStructuredEncryptionData: ...} command'
        strict: true
        fields:
            stats: compactStats
 
commands:
    compactStructuredEncryptionData :
        description: "Parser for the 'compactStructuredEncryptionData' Command"
        command_name: compactStructuredEncryptionData
        api_version: ""
        namespace: concatenate_with_db
        strict: true
        reply_type: CompactStructuredEncryptionDataCommandReply
        fields:
            compactionTokens:
                description: "Map of field path to EOCToken"
                type: object

A new action type “compactStructuredEncryptionData” will be added and this will be included in “readWriteAnyDB”, and “dbOwner”. This actionType will not be added to “dbAdmin” since only the owner of data has the ability to create the compaction tokens which a user in generic dbAdmin may not have the ability to.



 Comments   
Comment by Githook User [ 12/Feb/22 ]

Author:

{'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}

Message: SERVER-63199 Guard fle2 compact with feature flag & skip commands test unless on a replica set
Branch: master
https://github.com/mongodb/mongo/commit/ce43fa5df1f9756219376f49df02bfd2533e8c91

Comment by Githook User [ 11/Feb/22 ]

Author:

{'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}

Message: SERVER-63199 Add new compact skeleton for mongod
Branch: master
https://github.com/mongodb/mongo/commit/f67fd958c0b9c82e8ca14b004560502a98e71ddd

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