Skip to content

Unify Server and Local SLOG Recovery Pipeline - #1341

Merged
footka merged 7 commits into
oceanbase:masterfrom
Mai-icy:migrate/gitlab-mr-1100-task-2026072900117834131
Sep 3, 2026
Merged

Unify Server and Local SLOG Recovery Pipeline#1341
footka merged 7 commits into
oceanbase:masterfrom
Mai-icy:migrate/gitlab-mr-1100-task-2026072900117834131

Conversation

@Mai-icy

@Mai-icy Mai-icy commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Task Description

Migrate oceanbase/oceanbase-lite!1100 to SeekDB.

The change unifies server and local storage-log recovery, removes redundant lifecycle SLOG handling, and makes bootstrap checkpoint completion explicit.

Solution Description

  • Remove unnecessary lifecycle SLOG state and runtime handlers.
  • Propagate superblock header errors instead of masking them.
  • Share a worker thread across SLOG writers.
  • Commit local and server checkpoints during bootstrap.
  • Validate runtime and LS metadata before completing startup.

Passed Regressions

  • git diff --check upstream/master...HEAD
  • Full compilation, restart, bootstrap, and recovery regression testing have not yet been run on the migrated branch.

Upgrade Compatibility

This changes startup, bootstrap checkpoint, and SLOG recovery behavior. Upgrade, restart, and recovery compatibility should be validated before merge.

Other Information

  • Original GitLab MR: oceanbase/oceanbase-lite!1100
  • Original source branch: task/2026072900117834131
  • Original GitLab tip: 611805e104630b4519ebc2bd726299b1b260d761
  • The five original commits were transplanted in order onto the latest oceanbase/seekdb:master; authorship and commit messages were preserved.
  • One ob_server.cpp hunk was adapted to the current GitHub startup-control structure while retaining the original change's behavior.
  • GitLab and GitHub use unrelated Git histories, so commit SHAs changed during migration.

Release Note

Unify server and local SLOG recovery, remove redundant lifecycle logs, and commit bootstrap checkpoints explicitly.

@Mai-icy
Mai-icy force-pushed the migrate/gitlab-mr-1100-task-2026072900117834131 branch from 7947818 to 4ec877f Compare August 31, 2026 02:32
@hnwyllmm
hnwyllmm requested a balanced review from Copilot August 31, 2026 08:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Unifies server/local SLOG recovery and makes bootstrap checkpoint completion explicit.

Changes:

  • Removes runtime and LS lifecycle SLOG handling.
  • Shares one flush worker across SLOG writers.
  • Adds bootstrap checkpoints and startup metadata validation.

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/storage/tx_storage/ob_ls_service.h Simplifies LS lifecycle API/state.
src/storage/tx_storage/ob_ls_service.cpp Removes LS lifecycle SLOG operations.
src/storage/slog/ob_storage_log.h Removes lifecycle log entries.
src/storage/slog/ob_storage_log.cpp Removes lifecycle serialization.
src/storage/slog/ob_storage_log_writer.h Defines shared SLOG worker.
src/storage/slog/ob_storage_log_writer.cpp Implements shared flushing.
src/storage/slog/ob_storage_log_struct.h Removes lifecycle subtypes.
src/storage/slog/ob_server_slog_writer.cpp Uses shared writer lifecycle.
src/storage/slog_ckpt/ob_server_checkpoint_slog_handler.h Removes runtime lifecycle replay APIs.
src/storage/slog_ckpt/ob_server_checkpoint_slog_handler.cpp Removes runtime lifecycle replay.
src/storage/slog_ckpt/ob_local_storage_checkpoint_slog_handler.h Removes LS lifecycle replay APIs.
src/storage/slog_ckpt/ob_local_storage_checkpoint_slog_handler.cpp Simplifies replay and preserves superblock state.
src/storage/ob_super_block_struct.h Removes runtime creation status.
src/storage/meta_store/ob_server_storage_meta_service.cpp Updates replayer initialization.
src/storage/meta_store/ob_server_storage_meta_replayer.h Removes persister dependency.
src/storage/meta_store/ob_server_storage_meta_replayer.cpp Creates recovered runtime directly.
src/storage/meta_store/ob_server_storage_meta_persister.h Removes lifecycle persistence APIs.
src/storage/meta_store/ob_server_storage_meta_persister.cpp Removes lifecycle SLOG writes and cleanup.
src/storage/meta_store/ob_server_runtime_meta.h Removes status and changes wire version.
src/storage/meta_store/ob_server_runtime_meta.cpp Updates runtime metadata serialization.
src/storage/meta_store/ob_local_storage_meta_persister.h Removes LS lifecycle persistence APIs.
src/storage/meta_store/ob_local_storage_meta_persister.cpp Removes LS lifecycle SLOG writes.
src/storage/blocksstable/ob_object_manager.cpp Propagates header construction errors.
src/storage/api/storage/runtime/ob_i_server_runtime.h Simplifies runtime creation interface.
src/observer/omt/ob_server_runtime.h Removes creation-status setter.
src/observer/omt/ob_server_runtime.cpp Removes creation-status mutation.
src/observer/omt/ob_server_runtime_controller.h Updates runtime creation signature.
src/observer/omt/ob_server_runtime_controller.cpp Removes lifecycle SLOG workflow.
src/observer/ob_server.cpp Commits bootstrap checkpoints and validates metadata.
src/oblib/lib/oblog/ob_base_log_writer.h Adds single-batch flushing.
src/oblib/lib/oblog/ob_base_log_writer.cpp Implements single-batch flushing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/storage/meta_store/ob_server_runtime_meta.h Outdated

@hnwyllmm hnwyllmm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please help us change the mutex type to std::mutex in this PR. Thanks.

Comment thread src/oblib/lib/oblog/ob_base_log_writer.h Outdated
Comment thread src/storage/slog/ob_storage_log_writer.cpp Outdated

@hnwyllmm hnwyllmm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Mai-icy
Mai-icy force-pushed the migrate/gitlab-mr-1100-task-2026072900117834131 branch from fde8d68 to a65e518 Compare September 3, 2026 02:34
@footka
footka merged commit da23ae1 into oceanbase:master Sep 3, 2026
8 checks passed
wangyunlai-seekdb added a commit to wangyunlai-seekdb/seekdb that referenced this pull request Sep 4, 2026
…am-refresh-idle-writes

* upstream/master:
  Support random TCP ports in embedded mode (oceanbase#1354)
  Unify Server and Local SLOG Recovery Pipeline (oceanbase#1341)
  feat: support Sanity with jemalloc (oceanbase#1339)
  Remove legacy DirectLoadMgr and migrate DDL direct load to the idempotent path (oceanbase#1340)
  chore: remove internal-only deps blocks from deps/init (oceanbase#1347)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants