[SERVER-80345] BucketVersion should not use magic numbers Created: 23/Aug/23  Updated: 29/Oct/23  Resolved: 05/Sep/23

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

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

Assigned Teams:
Storage Execution NAMER
Backwards Compatibility: Fully Compatible
Sprint: Execution NAMR Team 2023-09-18
Participants:

 Description   

The time-series buckets have a control.version field that is currently either a 1 or 2 value. It is difficult to comprehend what the versions mean as integers as opposed to the descriptive names in timeseries_constants.h:

  • kTimeseriesControlUncompressedVersion
  • kTimeseriesControlCompressedVersion

 

Replace all magic numbers with these descriptive names.

A few examples:

  • bucket_unpacker.h
  • validate_adaptor.cpp
  • bucket_unpacker_test.cpp


 Comments   
Comment by Githook User [ 05/Sep/23 ]

Author:

{'name': 'Matt Kneiser', 'email': 'matt.kneiser@mongodb.com', 'username': 'themattman'}

Message: SERVER-80345 BucketVersion should not use magic numbers
Branch: master
https://github.com/mongodb/mongo/commit/eeb0f74ec26ddba1b40627f18f67954363b14a95

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