Project

General

Profile

Actions

Bug #54355

open

dbstore: confusing use of virtual inheritance for DBOps

Added by Casey Bodley about 2 years ago. Updated about 2 years ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
dbstore
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

virtual inheritance is usually a sign that class hierarchies are too complicated. here it's used because each SQL op derives from DBOp twice:

    class SQLInsertUser -> class SQLiteDB -> class rgw::store::DBOp
    class SQLInsertUser -> class rgw::store::InsertUserOp -> class rgw::store::DBOp

SQLiteDB is derived from DB, which should be global (per-database, at least) to the application. so it's unexpected that SQLiteDB derives from DBOp, and that each SQL op derives from SQLiteDB rather than storing a pointer to the 'global' one

Actions #1

Updated by Soumya Koduri about 2 years ago

  • Assignee set to Soumya Koduri
Actions

Also available in: Atom PDF