oceanbase / oceanbase/miniob

[BUG] RecordPageHandler initialize failed after observer restart.

Open
#279 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
4.4k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Create a table and insert some rows, then stop observer.

➜  build ✗ ./bin/obclient -s miniob.sock
miniob > create table just_a_test (id int, id2 int);
SUCCESS
miniob > insert into just_a_test values (1, 1);
SUCCESS
miniob > insert into just_a_test values (2,2);
SUCCESS
miniob > exit
--- 
### then stop observer
➜  build ✗ ./bin/obclient -s miniob.sock
miniob > select * from just_a_test;
id | id2

Restart observer, then select from the table created before. It return no record.
RecordPageHandler will be nullptr and record_page_iterator_ is invalid.

RC RecordFileScanner::fetch_next_record()
{
  RC rc = RC::SUCCESS;
  if (record_page_iterator_.is_valid()) {
    // 当前页面还是有效的,尝试看一下是否有有效记录
    rc = fetch_next_record_in_page();
  .......
}

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

Reproduce the issue by creating rows, stopping and restarting the observer, then querying the table. Start at RecordFileScanner::fetch_next_record and inspect how RecordPageHandler and record_page_iterator_ are initialized after restart; done means the existing rows are returned instead of an empty result or invalid iterator.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.