Skip to content

common/include: Add map type selection to interval_map#62200

Merged
batrick merged 1 commit intoceph:mainfrom
aainscow:interval_map_set_fixes
Mar 13, 2025
Merged

common/include: Add map type selection to interval_map#62200
batrick merged 1 commit intoceph:mainfrom
aainscow:interval_map_set_fixes

Conversation

@aainscow
Copy link
Contributor

@aainscow aainscow commented Mar 10, 2025

Interval_sets have the ability to choose the underlying data structure for the set, through a template selection. This changes allows similar behaviour in interval_map. This not only gives potential performance enhancements for some applications by using flat maps, but also allows better interop between interval_set and inverval_map.

There are also a couple of tweaks to interval_set in here around the previous introduction of strict mode.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

@aainscow aainscow requested a review from aclamk March 10, 2025 11:38
@aainscow aainscow force-pushed the interval_map_set_fixes branch from 9408f4f to 39f0d58 Compare March 11, 2025 11:21
@batrick batrick added the cephfs Ceph File System label Mar 11, 2025
Copy link
Member

@batrick batrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain in the commit message why you're creating a template for this. i.e. what do you want to use this for?

@aainscow aainscow force-pushed the interval_map_set_fixes branch from 39f0d58 to 47e153d Compare March 11, 2025 18:03
@aainscow aainscow requested a review from ronen-fr March 11, 2025 19:00
Add capability to choose the type of map used in interval_map.

The default will be std::map and so should not change any existing
implementation.

This behaviour is already available in interval_set. The intention
is to enable a more efficient map library which suits a particular
application.

The optimized EC code, which is coming soon, will use a boost::flat_map
here since it deals with large numbers of very small (usually single-entry)
interval_maps.

Also adds fmt::format support and refactors print functions in both
set and map.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
@aainscow aainscow force-pushed the interval_map_set_fixes branch from 47e153d to 96be3f1 Compare March 12, 2025 00:11
@aainscow aainscow requested a review from batrick March 12, 2025 00:15
@aainscow
Copy link
Contributor Author

Please explain in the commit message why you're creating a template for this. i.e. what do you want to use this for?

Updated to explain how this will be used in EC optimizations.

@aainscow aainscow dismissed batrick’s stale review March 12, 2025 00:20

I added requested change manually.

@aainscow
Copy link
Contributor Author

jenkins test make check

@aainscow
Copy link
Contributor Author

jenkins test make check arm64

1 similar comment
@batrick
Copy link
Member

batrick commented Mar 12, 2025

jenkins test make check arm64

@batrick
Copy link
Member

batrick commented Mar 12, 2025

This PR is under test in https://tracker.ceph.com/issues/70426.

@batrick
Copy link
Member

batrick commented Mar 12, 2025

jenkins test make check arm64

@aainscow
Copy link
Contributor Author

jenkins test make check

@batrick batrick merged commit 60fda1d into ceph:main Mar 13, 2025
11 checks passed
@aainscow aainscow added the no-backport-required Label that can be optionally added to show that we do not need to backport. label Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephfs Ceph File System common needs-qa no-backport-required Label that can be optionally added to show that we do not need to backport. tests wip-pdonnell-testing2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants