Skip to content

bump xitdb to avoid torn header - #49

Merged
codeboost merged 1 commit into
masterfrom
bump-xitdb
Nov 13, 2026
Merged

codeboost merged 1 commit into
masterfrom
bump-xitdb

Conversation

@xeubie

@xeubie xeubie commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

This adds a new database format, version 2, while staying compatible with version 1 databases. In version 2, the root header is stored differently so the file size is at a byte-aligned place in the database. This should make it impossible for a reader to read an invalid value while a write is happening.

It also improves replication behavior (hence the docstring changes): A full copy now replaces the replica only once the source's header has arrived and passed its checks. Before, a dropped connection or an incompatible source wiped the replica as soon as the copy began. Now the replica is only lost once the incoming bytes are known to be a valid database it can use.

@codeboost codeboost left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

👍

@codeboost
codeboost merged commit 69fcd54 into master Nov 13, 2026
2 checks passed
@xeubie
xeubie deleted the bump-xitdb branch November 13, 2026 20:13
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