Ignore system meta-descriptor rows during replay#3891
Merged
Conversation
1 task
kim
approved these changes
Dec 16, 2025
Centril
approved these changes
Dec 16, 2025
Contributor
Author
|
This PR appears to not (yet) have fully fixed the issue: I get a unique constraint violation after replay on |
Shubham8287
reviewed
Dec 17, 2025
We've encountered a commitlog which includes inserts into `st_table`, `st_column`, &c of the rows which describe `st_view`, `st_view_param`, &c. This caused replay to fail, as those rows were already inserted during bootstrapping, so we got set-semantic duplicate errors. With this commit, we ignore set-semantic duplicate errors when replaying a commitlog specifically for rows in system tables which describe system tables.
Use `Cow<'_, str>` and `Cow<'_, [u8]>` rather than `&str` and `&[u8]` when deserializing parts of `st_table` and `st_column` which are encoded as strings and bytes, as the only-borrowed deserializers error when passed a `ValueDeserializer`, due to the inability to borrow.
3539a19 to
139dc8b
Compare
Contributor
Author
|
Rebased onto master, as the previous base branch has merged in #3887 . |
…ted system sequences
…tance (#3892) # Description of Changes Based on #3891 . Begin reviewing from commit 4370b69. Prior to this commit, we treated it as an error (in fact a panic, prior to an earlier commit of mine today) when deleting a table during replay which didn't have an in-memory instace. This should not have been an error, as it's not problematic, and it can occur in valid commitlogs when a table is initially empty and is never used prior to its deletion. With this commit, don't error. # API and ABI breaking changes N/a # Expected complexity level and risk 1 # Testing - [x] Manually replayed a database with such a deleted table. Got an error prior to this commit, succeeded replay with this commit.
joshua-spacetime
approved these changes
Dec 17, 2025
Collaborator
|
I did nothing differently here to get it to merge 😅 |
aasoni
pushed a commit
that referenced
this pull request
Feb 5, 2026
Based on #3887 . Review starting from commit 233b48c. We've encountered a commitlog which includes inserts into `st_table`, `st_column`, &c of the rows which describe `st_view`, `st_view_param`, &c. This caused replay to fail, as those rows were already inserted during bootstrapping, so we got set-semantic duplicate errors. With this commit, we ignore set-semantic duplicate errors when replaying a commitlog specifically for rows in system tables which describe system tables. We also have to do an additional fixup for sequences. This is described in-depth in comments added at the relevant locations. N/a 1 - I was careful not to swallow any errors which aren't obviously safe. - [x] Manually replayed commitlog which includes the above mentioned inserts, got error prior to this commit, no error with this commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Based on #3887 . Review starting from commit 233b48c.
We've encountered a commitlog which includes inserts into
st_table,st_column, &c of the rows which describest_view,st_view_param, &c. This caused replay to fail, as those rows were already inserted during bootstrapping,so we got set-semantic duplicate errors. With this commit, we ignore set-semantic duplicate errors when replaying a commitlog specifically for rows in system tables which describe system tables.
We also have to do an additional fixup for sequences. This is described in-depth in comments added at the relevant locations.
API and ABI breaking changes
N/a
Expected complexity level and risk
1 - I was careful not to swallow any errors which aren't obviously safe.
Testing