创建的索引在重启observer后失效
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.4k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
问题描述
create index创建的索引在下一次重启服务器后会失效,稳定复现
Successfully load /root/code/miniob/etc/observer.ini
Invalid arguments, item_size:0, pool_num:1, item_num_per_pool:128, this->name:./miniob/db/sys/t-t_index.index.
Failed to open index. table=t, index=t_index, file=./miniob/db/sys/t-t_index.index, rc=12:NOMEM
Failed to open table. filename=t.table
Failed to open db: sys. error=12
复现过程
miniob > create table t(i int);
SUCCESS
miniob > insert into t values(1);
SUCCESS
miniob > create index t_index on t(i);
SUCCESS
后重启observer
环境
- 开发环境:miniob最新dockerfile
- 版本:
miniob_test,clone后未做任何修改 - 编译参数:
cmake .. DDBUG=ON && make -j12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the sequence in the issue with the miniob observer, then restart it and inspect the index-loading path that reports item_size:0 for ./miniob/db/sys/t-t_index.index. Trace how the created index is written and reopened; done means the index loads successfully after restart and the database opens without the reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100