WSREP status codes to be integrated into perror or printed or documented

Bug #1091179 reported by Raghavendra D Prabhu on 2012-12-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Undecided
Unassigned
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Confirmed
Wishlist
Raghavendra D Prabhu

Bug Description

In instances like:

"wsrep::init() failed: %d, must shutdown",

an error code is printed without any explanation.

Following statuses defined in wsrep_api.h are returned:

typedef enum wsrep_status {
    WSREP_OK = 0, //!< success
    WSREP_WARNING, //!< minor warning, error logged
    WSREP_TRX_MISSING, //!< transaction is not known by wsrep
    WSREP_TRX_FAIL, //!< transaction aborted, server can continue
    WSREP_BF_ABORT, //!< trx was victim of brute force abort
    WSREP_CONN_FAIL, //!< error in client connection, must abort
    WSREP_NODE_FAIL, //!< error in node state, wsrep must reinit
    WSREP_FATAL, //!< fatal error, server must abort
    WSREP_NOT_IMPLEMENTED //!< feature not implemented
} wsrep_status_t;

So,

a) It needs to be integrated into perror framework (in which case
it needs to have error code with an offset as in errmsg-utf8.txt
)

b) Use strerror or equivalent to print the error in full at
WSREP_ERROR and other WSREP_* instances.

c) Document it somewhere.

a) and b) are preferrable.

Changed in percona-xtradb-cluster:
assignee: nobody → Raghavendra D Prabhu (raghavendra-prabhu)
status: New → Triaged

Also, seen in cases like

 WSREP: applier thread exiting (code:0)
 [Note] WSREP: applier thread exiting (code:5)

It is better to integrate it into perror framework.

Changed in percona-xtradb-cluster:
milestone: none → 5.5.31-25
Changed in percona-xtradb-cluster:
milestone: 5.5.33-23.7.6 → future-5.5
Changed in percona-xtradb-cluster:
status: Triaged → Confirmed
importance: Undecided → Wishlist

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1157

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers