Bug 2246547 - [Backport to 4.13.z] Fix analytics data missing fields in DB
Summary: [Backport to 4.13.z] Fix analytics data missing fields in DB
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: Multi-Cloud Object Gateway
Version: 4.13
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ODF 4.13.7
Assignee: Nimrod Becker
QA Contact: Tiffany Nguyen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-10-27 11:24 UTC by Utkarsh Srivastava
Modified: 2024-03-18 13:24 UTC (History)
4 users (show)

Fixed In Version: 4.13.7-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-01-29 08:22:08 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github noobaa noobaa-core pull 7373 0 None Merged Fix `INVALID_SCHEMA_DB objectstats ERRORS` 2024-01-03 08:47:01 UTC
Github noobaa noobaa-core pull 7692 0 None Merged [Backport into 5.13] Fix objectstats errors and queries 2024-01-03 10:37:17 UTC
Red Hat Product Errata RHBA-2024:0540 0 None None None 2024-01-29 08:22:12 UTC

Description Utkarsh Srivastava 2023-10-27 11:24:56 UTC
Description of problem (please be detailed as possible and provide log
snippests):
NooBaa analytics tables store data like bandwidth usage etc. These tables do not have all the desired fields at the moment.

The consequence of this is that DB queries become extremely slow over time and NooBaa cleanups can not clear the stale entries leading to degraded performance.

Version of all relevant components (if applicable):


Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?


Is there any workaround available to the best of your knowledge?
Manually cleaning up the analytics table helps.

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
1

Can this issue reproducible?
Yes

Can this issue reproduce from the UI?
N/A

If this is a regression, please provide more details to justify this:


Steps to Reproduce:
1.
2.
3.


Actual results:
Tables like `usagereports` should have all the fields defined.

Expected results:
Tables like `usagereports` do not have fields like system_id, start_time, end_time, etc defined.


Additional info:

Comment 7 Tiffany Nguyen 2024-01-23 19:25:38 UTC
Verified with ODF 4.13.7

The table contains the fields defined.  Mark as verified.

nbcore=# \d datablocks
                Table "public.datablocks"
 Column |     Type      | Collation | Nullable | Default 
--------+---------------+-----------+----------+---------
 _id    | character(24) |           | not null | 
 data   | jsonb         |           |          | 
Indexes:
    "datablocks_pkey" PRIMARY KEY, btree (_id)
    "idx_btree_datablocks__id_index" UNIQUE, btree ((data ->> '_id'::text))
    "idx_btree_datablocks_aggregate_by_delete_dates" btree (to_ts(data ->> 'deleted'::text)) WHERE data ? 'deleted'::text
    "idx_btree_datablocks_chunk" btree ((data ->> 'chunk'::text)) WHERE data ? 'chunk'::text
    "idx_btree_datablocks_node__id" btree ((data ->> 'node'::text), (data ->> '_id'::text) DESC) WHERE data ? 'node'::text

nbcore=# \d datachunks
                Table "public.datachunks"
 Column |     Type      | Collation | Nullable | Default 
--------+---------------+-----------+----------+---------
 _id    | character(24) |           | not null | 
 data   | jsonb         |           |          | 
Indexes:
    "datachunks_pkey" PRIMARY KEY, btree (_id)
    "idx_btree_datachunks__id_index" UNIQUE, btree ((data ->> '_id'::text))
    "idx_btree_datachunks_aggregate_by_delete_dates" btree (to_ts(data ->> 'deleted'::text)) WHERE data ? 'deleted'::text
    "idx_btree_datachunks_dedup_key" btree ((data ->> 'dedup_key'::text)) WHERE data ? 'dedup_key'::text
    "idx_btree_datachunks_id_desc" btree ((data ->> '_id'::text) DESC) WHERE (data -> 'deleted'::text) IS NULL OR (data -> 'deleted'::text) = 'null'::jsonb
    "idx_btree_datachunks_tiering_index" btree ((data ->> 'tier'::text), (data ->> 'tier_lru'::text) DESC) WHERE ((data -> 'deleted'::text) IS NULL OR (data -> 'deleted'::text) = 'null'::jsonb) AND data ? 'tier'::text AND data ? 'tier_lru'::text

nbcore=# \d usagereports
               Table "public.usagereports"
 Column |     Type      | Collation | Nullable | Default 
--------+---------------+-----------+----------+---------
 _id    | character(24) |           | not null | 
 data   | jsonb         |           |          | 
Indexes:
    "usagereports_pkey" PRIMARY KEY, btree (_id)
    "idx_btree_usagereports__id_index" UNIQUE, btree ((data ->> '_id'::text))
    "idx_btree_usagereports_start_time_aggregated_time_aggregated_ti" btree ((data ->> 'start_time'::text), (data ->> 'aggregated_time'::text) DESC, (data ->> 'aggregated_time_range'::text))

Comment 11 errata-xmlrpc 2024-01-29 08:22:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenShift Data Foundation 4.13.7 Bug Fix Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2024:0540


Note You need to log in before you can comment on or make changes to this bug.