oceanbase / oceanbase/seekdb

ALTER SYSTEM ACTIVATE STANDBY fails with error 4109 after resetting log_restore_source during standby-to-primary switch

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

Nobody has claimed this yet.

dima
Dominant language
C++
Stars
2.9k
Forks
342
Avg merge
2d 14h
Merged PRs (30d)
53

Description

Environment

  • Server version: OceanBase 4.3.5.3 seekdb (r1.2.0.0)
  • Build info: Built 1-e536cfa77c25c6fde5e541fcdee9ead835a41d43 Mar 13 2026
  • CPU: 8
  • Memory: [memeo...]

Description

During a standby-to-primary switch operation, after resetting the log_restore_source configuration, executing the ALTER SYSTEM ACTIVATE STANDBY command fails and returns error 4109 with the message: 'Server state or role not the same as expected'.

Steps to Reproduce

  1. Perform a standby-to-primary switch.
  2. Reset the log_restore_source configuration.
  3. Execute the command ALTER SYSTEM ACTIVATE STANDBY.
  4. Observe the error 4109: 'Server state or role not the same as expected'.

Creator: cms-cms

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 by reproducing the standby-to-primary switch, resetting log_restore_source, and running ALTER SYSTEM ACTIVATE STANDBY. Trace the server state and role checks involved in this sequence and compare the behavior before and after the configuration reset. Done means the command completes successfully after the reset instead of returning error 4109.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, sql
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.