-
Notifications
You must be signed in to change notification settings - Fork 663
Ignore system meta-descriptor rows during replay #3891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This PR appears to not (yet) have fully fixed the issue: I get a unique constraint violation after replay on |
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
|
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.
|
I did nothing differently here to get it to merge 😅 |
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