Project

General

Profile

Actions

Enhancement #69314

closed
AK JP

Refactor class Allocator

Enhancement #69314: Refactor class Allocator

Added by Adam Kupczyk almost 2 years ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v20.0.0-58-g2ab735f3a7
Released In:
v20.2.0~950
Upkeep Timestamp:
2025-11-01T01:15:05+00:00

Description

Currently `class Allocator` is both an interface and base class.
Users of Allocator class (BlueStore, BlueFS, tools) need an interface.
Implementators of Allocator class (BitmapAllocator, AvlAllocator, ... ) could benefit from having some common behavior coded in,
like AdminSocket, useful classes etc.

The problem is that now it is impossible to create an adapter class that can be put between users and implementators.

Example:
I want to make a histogram of time spent in allocate() and release(), and make it possible for every current and future allocator.
Currently:
BlueStore::alloc (type Allocator*) -> AvlAllocator (inherits from Allocator)

Want:
BlueStore::alloc (type Allocator*) -> TrackHistogram (inherits from Allocator) -> AvlAllocator (inherits from AllocatorBase)

JP Updated by Jaya Prakash almost 2 years ago Actions #1

  • Status changed from New to Fix Under Review
  • Pull request ID set to 61502

JP Updated by Jaya Prakash over 1 year ago Actions #2

  • Status changed from Fix Under Review to Resolved

UB Updated by Upkeep Bot over 1 year ago Actions #3

  • Merge Commit set to 2ab735f3a728be8b5ade7a6e9e1a9c35570628d6
  • Fixed In set to v20.0.0-58-g2ab735f3a72
  • Upkeep Timestamp set to 2025-07-10T04:45:00+00:00

UB Updated by Upkeep Bot over 1 year ago Actions #4

  • Fixed In changed from v20.0.0-58-g2ab735f3a72 to v20.0.0-58-g2ab735f3a7
  • Upkeep Timestamp changed from 2025-07-10T04:45:00+00:00 to 2025-07-14T19:37:56+00:00

UB Updated by Upkeep Bot about 1 year ago Actions #5

  • Released In set to v20.2.0~950
  • Upkeep Timestamp changed from 2025-07-14T19:37:56+00:00 to 2025-11-01T01:15:05+00:00
Actions

Also available in: PDF Atom