Skip to content

LazyCommits Specification - #429

Open
ghost wants to merge 2 commits into
mainfrom
docs/LazyCommits
Open

LazyCommits Specification#429
ghost wants to merge 2 commits into
mainfrom
docs/LazyCommits

Conversation

@ghost

@ghost ghost commented Feb 16, 2026

Copy link
Copy Markdown

No description provided.

@ghost
ghost requested a review from rjb32 as a code owner February 16, 2026 11:15
@ghost
ghost force-pushed the docs/LazyCommits branch from 9dab93f to 8c07a26 Compare February 16, 2026 12:43
Comment thread docs/LazyCommits/Spec.MD
```
<graph-path>/
info
type

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.

What is "type" for a graph?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

We have a type file to help identify if we are looking at a turingDB binary

Comment thread docs/LazyCommits/Spec.MD Outdated

#### Ownership

`VersionController` owns the commit log as `std::vector<CommitLog>`. This

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.

I think we need to disambiguate CommitLogRecord and CommitLog itself

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Actually I think the spec needs to change a bit given we don't implement the commit history this way.

Comment thread docs/LazyCommits/Spec.MD
| `GraphReader::isNodeDeleted` | Accesses `commits().back().tombstones()` | Access tombstones directly from CommitData |
| `CommitBuilder` | Accesses `commits().back()` for prev | Receives previous commit reference explicitly |

After this refactoring, `CommitHistory` retains only:

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.

Does it mean that CommitHistory continues to exist?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

CommitHistory previously contained all the dataparts of the a Commit + the vector of commit views representing the commit history. I think the CommitHistory name should be changed now.

@ghost
ghost force-pushed the docs/LazyCommits branch from 8c07a26 to 4548c06 Compare February 27, 2026 16:37
Comment thread docs/LazyCommits/Spec.MD
- Load only the data required for the commits that are actually accessed.
- Eagerly load HEAD at startup (since most operations target it).
- Keep all other commits as lightweight stubs that can be hydrated on demand.
- Introduce a graph-level commitlog file that provides fast commit history

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.

TO remove

Comment thread docs/LazyCommits/Spec.MD
`Commit` object for each hash. For each stub:
- `_prevCommit` is wired to the previously created stub.
- The commit's `metadata` file is read to populate `_numNodes`, `_numEdges`,
and `_numDataParts` on the stub, and to cache the `DataPartID` list for

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Change this info about datapartID list. We only create this when we hydrate a commit and come across dataparts.

Comment thread docs/LazyCommits/Spec.MD

The runtime write path is unaffected:

- `Commit::createNextCommit` continues to call

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

could add an assert here

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.

2 participants