h2database / h2database/h2database

Store data and indices in two separate files

Open
#3,566 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.6k
Forks
1.3k
Avg merge
1d 2h
Merged PRs (30d)
9

Description

I think we should split the file containing data and indices into separate files.

Benefits:

  1. You can always regenerate the index, but data, once lost, it's forever. Having just the data encapsulated would make recovery process easier.
  2. Less chance of data corruption. If you have a bug in your indexing code, that will not affect the data.
  3. Backups become much simpler. You can choose to copy just the much smaller data file, not the while thing.
  4. You can choose a more performant (and less safe) file system operation for just the index file. For example, no copy on write in btrfs.

Contributor guide

No contributing guide indexed for this repository

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

No files, tests, or entry points are named. Start by reviewing H2's current combined data-and-index storage design, then define the separation and recovery behavior; done should allow index regeneration, protect data from index corruption, and support backing up only the data file.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.