[SERVER-61018] Create a generic histogram type Created: 26/Oct/21  Updated: 29/Oct/23  Resolved: 25/Feb/22

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 6.0.0-rc0, 5.0.9, 4.4.15

Type: Improvement Priority: Major - P3
Reporter: Amirsaman Memaripour Assignee: Reo Kimura (Inactive)
Resolution: Fixed Votes: 0
Labels: auto-reverted
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
causes SERVER-65924 Modify resharding_histogram_metrics.j... Closed
Related
is related to SERVER-57742 Create a non-specialized version of t... Closed
is related to SERVER-59858 Add observability for tasks scheduled... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0, v4.4
Sprint: Service Arch 2022-1-10, Service Arch 2022-1-24, Service Arch 2022-2-07, Service Arch 2022-2-21, Service Arch 2022-03-07
Participants:
Linked BF Score: 183
Story Points: 5

 Description   

Tasks:

  • Rewrite IntegerHistogram so that it is just a generic Histogram.
  • Add a template parameter to the class of the key type, rather than int64
    • Perhaps static_assert that the key type has operator< well-defined so that we can use std::upper_bound to find the insertion index
  • Add a type alias for IntegerHistogram so that it has identical behavior to today. Should just be the now “generic” Histogram with int64_t as the first type parameter
  • Add aliases for Duration types (like Milliseconds) to ensure they work.

Old text

Introduce a generic histogram type that can replace/extend IntegerHistogram and offer more flexibility. This new type should allow defining customized tags for each bucket when serializing the histogram, and support duration types (e.g., Milliseconds).



 Comments   
Comment by Githook User [ 24/Apr/22 ]

Author:

{'name': 'Jess Balint', 'email': 'jbalint@gmail.com', 'username': 'jbalint'}

Message: SERVER-61018 Create a generic histogram type

(cherry picked from commit 2c49a73a91cadd788b987671939f60f292bf693f)
Branch: v4.4
https://github.com/mongodb/mongo/commit/b6c3b82b5ca3afc1a9b9036ff96278d16a1866ed

Comment by Githook User [ 22/Apr/22 ]

Author:

{'name': 'Jess Balint', 'email': 'jbalint@gmail.com', 'username': 'jbalint'}

Message: SERVER-61018 Create a generic histogram type

(cherry picked from commit 3d65993807a72ce07aa54fe257887561ebb63809)
Branch: v5.0
https://github.com/mongodb/mongo/commit/2c49a73a91cadd788b987671939f60f292bf693f

Comment by Jess Balint [ 22/Apr/22 ]

adding backports as a dependency of SERVER-63642

Comment by Githook User [ 25/Feb/22 ]

Author:

{'name': 'Reo Kimura', 'email': 'reo.kimura@mongodb.com', 'username': 'rkimura21'}

Message: SERVER-61018 Create a generic histogram type
Branch: master
https://github.com/mongodb/mongo/commit/3d65993807a72ce07aa54fe257887561ebb63809

Comment by xgen-buildbaron-user [ 24/Feb/22 ]

Ticket re-opened due to revert. sharding_multiversion began a consistent failure of jstests/sharding/resharding_histogram_metrics.js

Comment by Githook User [ 24/Feb/22 ]

Author:

{'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com'}

Message: Revert "SERVER-61018 Create a generic histogram type"

This reverts commit 1f1d912e1a65a66c6d0f7a0b4e4ec687007ecd44.
Branch: master
https://github.com/mongodb/mongo/commit/f8ee418d0a89eceb7864e4f3e97886ea90b91967

Comment by Githook User [ 23/Feb/22 ]

Author:

{'name': 'Reo Kimura', 'email': 'reo.kimura@mongodb.com', 'username': 'rkimura21'}

Message: SERVER-61018 Create a generic histogram type
Branch: master
https://github.com/mongodb/mongo/commit/1f1d912e1a65a66c6d0f7a0b4e4ec687007ecd44

Comment by xgen-buildbaron-user [ 19/Feb/22 ]

Ticket re-opened due to revert. sharding_auth began a consistent failure of jstests/sharding/resharding_histogram_metrics.js

Comment by Githook User [ 19/Feb/22 ]

Author:

{'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com'}

Message: Revert "SERVER-61018 Create a generic histogram type"

This reverts commit 06124a018dd1c6abed0fbda003d214f1c34ece7b.
Branch: master
https://github.com/mongodb/mongo/commit/487495b98ee6cad09649421371fbf4769ddfec75

Comment by Githook User [ 18/Feb/22 ]

Author:

{'name': 'Reo Kimura', 'email': 'reo.kimura@mongodb.com', 'username': 'rkimura21'}

Message: SERVER-61018 Create a generic histogram type
Branch: master
https://github.com/mongodb/mongo/commit/06124a018dd1c6abed0fbda003d214f1c34ece7b

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