Skip to content

feat: introduce committed version IDs to avoid accidentally writing dirty version ID trackers#740

Merged
mattisonchao merged 5 commits intomainfrom
feat.improve.version_id
Aug 28, 2025
Merged

feat: introduce committed version IDs to avoid accidentally writing dirty version ID trackers#740
mattisonchao merged 5 commits intomainfrom
feat.improve.version_id

Conversation

@mattisonchao
Copy link
Copy Markdown
Member

@mattisonchao mattisonchao commented Aug 18, 2025

Motivation

introduce committed version IDs to avoid accidentally writing dirty version ID trackers

Modification

  • Introduce the committed version ID to avoid increasing the version if the whole write logic failed.
  • Add another condition on TestDBVersionIDWithError to reproduce the issue.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces committed version IDs to prevent accidental writes of dirty version ID trackers by separating in-memory tracking from committed state.

  • Renames versionIdTracker to committedVersionIDTracker to clarify it tracks only committed versions
  • Adds local version ID tracking during write operations to avoid prematurely updating the committed tracker
  • Updates the committed tracker only after successful batch commits

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mattisonchao mattisonchao marked this pull request as draft August 26, 2025 15:10
@mattisonchao mattisonchao marked this pull request as ready for review August 26, 2025 16:26
@mattisonchao mattisonchao force-pushed the feat.improve.version_id branch from 2b43aa7 to a131429 Compare August 28, 2025 01:39
@mattisonchao mattisonchao merged commit 1b96120 into main Aug 28, 2025
8 checks passed
@mattisonchao mattisonchao deleted the feat.improve.version_id branch August 28, 2025 02:18
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.

3 participants