dolthub / dolthub/dolt

`from_commit` in some Dolt system tables is ambiguous

Open
#5,188 0 comments 0 reactions 0 assignees View on GitHub
diff question
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 5h
Merged PRs (30d)
108

Description

@reltuk @zachmu and I had a conversation about the diff table behavior ([docs here](https://docs.dolthub.com/sql-reference/version-control/dolt-system-tables#dolt_commit_diff_usdtablename)) and this PR: https://github.com/dolthub/dolt/pull/5181.

Summary is that it is not totally clear that the `from_commit` for a listed diff is meaningful in some contexts when a commit is a parent by multiple commits higher in the graph. Usually those will be branches, but there can also be long-running transactions in a single branch that all non-fast forward merge back to a reference `from_commit` parent. In general it is not clear whether the diff table should report the diffs for all of those parent/child pairs. If we list all, the same diff could be listed twice, which can be hard to distinguish from each commit independently legitimately contributing the same diff. If we choose a single highest/lowest height parent, the `from_commit` output by the diff table might be confusing to follow and understand from the diff output.

Generally we want a simple set of semantics users can expect the diff table to perform. We can always add system tables to deliver slightly different semantics if we cannot resolve narrative conflicts. Zach wants a "generally linear ordering". Somewhat related, Aaron interested in whether we should enforce limits on how the commit graph grows to make transaction+versioning semantics clearer to understand.

TODO:
- write more test cases to understand and document commit graph edge cases (current behavior isn't the point)
- product design document that more clearly articulates what the diff table should do and why.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.