oceanbase / oceanbase/seekdb

[Enhancement]: [embed] return meaningful error message to user

Open
#8 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted module: embed type: enhancement vibe coding: hard
Dominant language
C++
Stars
2.9k
Forks
339
Avg merge
1d 19h
Merged PRs (30d)
52

Description

Enhancement
The error messages returned to user is not clear enough, for example:

>>> seekdb.open()
>>> seekdb.open()
[seekdb] seekdb has opened
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: open seekdb failed 4005 The object is initialized twice

Maybe we can transfer internal error information to mysql error message.
There're some help functions to convert oceanbase error message to user message:

// in file src/share/ob_errno.h
int ob_mysql_errno(const int oberr);
  int ob_mysql_errno_with_check(const int oberr);
  const char *ob_sqlstate(const int oberr);
  const char *ob_strerror(const int oberr);
  const char *ob_str_user_error(const int oberr);

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

Start with the embedded seekdb.open() error path shown in the issue and read src/share/ob_errno.h, especially ob_mysql_errno, ob_mysql_errno_with_check, ob_sqlstate, ob_strerror, and ob_str_user_error. Trace how the internal 4005 error reaches the user-facing API. Done means failed opens return a meaningful MySQL-style or user-facing message instead of only internal error details.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.