oceanbase / oceanbase/ob-operator

[Bug]: Selecting archive summary table after setting ARCHIVELOG at once causes type converting error

Open
#630 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
172
Forks
44
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
  1. Apply a OBTenantBackupPolicy resource
  2. Error occurs several seconds after applying the resource
Query list failed, sql SELECT dest_id, round_id, dest_no, status, start_scn, start_scn_display, checkpoint_scn, checkpoint_scn_display, compatible, base_piece_id, used_piece_id, piece_switch_interval, input_bytes, input_bytes_display, output_bytes, output_bytes_display, compression_ratio, deleted_input_bytes, deleted_input_bytes_display, deleted_output_bytes, deleted_output_bytes_display, comment, path FROM DBA_OB_ARCHIVELOG_SUMMARY ORDER BY round_id DESC LIMIT 1, param []: sql: Scan error on column index 7, name "checkpoint_scn_display": converting NULL to string is unsupported
Environment

ob-operator 2.3.0

Fast reproduce steps
  1. Apply a OBTenantBackupPolicy resource
  2. Error occurs several seconds after applying the resource
Expected behavior

No response

Actual behavior

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the OBTenantBackupPolicy reconciliation path and the query for DBA_OB_ARCHIVELOG_SUMMARY, focusing on how checkpoint_scn_display is scanned. Check the existing tests around this reconciliation or query path, then verify that applying the resource succeeds when the database returns NULL for that column.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, sql
Domain
databases, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.